Skip to content

A Vim teaching plugin to show common marks in signcolumn

Notifications You must be signed in to change notification settings

coderonline/vim-karlmarks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

vim-karlmarks

A teaching plugin for Vim. It uses the signcolumn to display currently active marks. These are mostly used as jump locations and some are set by Vim automatically during the edit sessions. Also user defined marks are shown. These can be set with m[a-z], e.g. ma sets mark a and this plugin would display its line and you can jump to that line with ```a``. Captital letters even allow jumps between files and session persistent marks.

screencast

Chances are that you have learned only some of the marks Vim has to offer. This plugin will remember you to use more and once you have that on disk you can always deinstall it again.

Prerequirements

I recommend you use this in your ~/.vim/vimrc

set signcolumn=yes

because if you set it to signcolumn=auto it will flicker when you change the window.

Installation

Download the zip file and extract it inside ~/.vim/pack/coderonline/start/.

Example

mkdir ~/.vim/pack/coderonline/start/
cd    ~/.vim/pack/coderonline/start/
# download plugin in that directory:
curl -o vim-karlmarks.zip  https://git.entwicklerseite.de/vim-karlmarks/snapshot/vim-karlmarks-master.zip
# unzip the zip file
unzip vim-karlmarks.zip
# remove zip file (not needed any more)
rm vim-karlmarks.zip

Configure optional and additional marks

Here comes some inspiration for additional marks you could enable. Some are potentially disturbing and are not pre-configured for that reason:

let g:karlmarks  =   '"'  " position in buffer when left
let g:karlmarks .=  '{}'  " start/end paragraph
let g:karlmarks .=  '()'  " start/end sentence
let g:karlmarks .=  '[]'  " start/end sentence
let g:karlmarks .=  '.'   " last change
let g:karlmarks .=  "^"   " insert mode stopped
let g:karlmarks .=  "'`"

but the g_karlmarks setting defaults to

let g:karlmarks = "<>"

to allow easier modification of the last selected block, e.g. reposition the start of the block with m< and use gv to show the new selection.

Deinstallation

Remove the folder ~/.vim/pack/coderonline/start/vim-karlmarks (if you named it as suggested in the Installation section)

Exmaple

rm -irv ~/.vim/pack/coderonline/start/vim-karlmarks

Releases

No releases published

Packages

No packages published