Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- " List Abbreviations for word behind cursor
- " Barry Arthur, Jan 04 2012
- function! CursorWord()
- return matchstr(strpart(getline('.'), 0, col('.')), '\w\+\ze\s*$')
- endfunction
- function! AbbrList(word)
- exe "iabbr ".a:word
- return "\<c-w>".a:word
- endfunction
- inoremap <expr> <leader>a AbbrList(CursorWord())
Advertisement
Add Comment
Please, Sign In to add comment