Created
January 30, 2014 09:04
-
-
Save dahu/8704952 to your computer and use it in GitHub Desktop.
Embelish a line with a thing when you move to it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function! Embelish(thing) | |
let line = line('.') | |
let l = getline(line) | |
if l !~ a:thing . '\s*$' | |
let l = l . a:thing | |
endif | |
call setline(line, [l]) | |
endfunction | |
autocmd CursorMoved * call Embelish(';') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment