don't startinsert with funced, closes #12

This commit is contained in:
Dag Odenhall 2013-11-14 13:34:20 +01:00
parent 9da005e04e
commit e35e2f356a

View file

@ -6,13 +6,8 @@ autocmd BufRead *
\ setlocal filetype=fish |
\ endif
" Start Insert inside function edited with `funced`.
autocmd BufRead fish_funced_*_*.fish
\ ?\C^end\>?-1 |
\ if getline('.') ==# '' |
\ execute "normal! i\<C-t>" |
\ endif |
\ startinsert!
" Move cursor to first empty line when using funced.
autocmd BufRead fish_funced_*_*.fish call search('^$')
" Fish histories are YAML documents.
autocmd BufRead,BufNewFile ~/.config/fish/fish_{read_,}history setfiletype yaml
@ -23,6 +18,6 @@ autocmd BufRead,BufNewFile ~/.config/fish/fishd.* setlocal readonly
" Mimic `funced` when manually creating functions.
autocmd BufNewFile ~/.config/fish/functions/*.fish
\ call append(0, ['function '.expand('%:t:r'),
\repeat(' ', &shiftwidth),
\'',
\'end']) |
\ 4delete | 2 | startinsert!
\ 2