mirror of
https://github.com/dag/vim-fish
synced 2024-09-16 13:44:02 +02:00
don't startinsert with funced, closes #12
This commit is contained in:
parent
9da005e04e
commit
e35e2f356a
1 changed files with 4 additions and 9 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue