~gpanders/dotfiles

ref: 12291d3163062a0a3c879f53a0b0d02541376ca4 dotfiles/vim/.vim/after/ftplugin/vim.vim -rw-r--r-- 364 bytes
12291d31Greg Anders [vim] Make git commit buffers in vim always start at line 1 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
" Vim
if &filetype !=# 'vim'
  finish
endif

setlocal foldmethod=marker

" Z: execute current line or visually selected region in command mode
nnoremap <buffer> Z: ^"zyg_:<C-R>z<CR>
vnoremap <buffer> Z: "zy:<C-U><C-R>=substitute(@z, "\n", "<Bar>", "g")<CR><BS>

" Source current file with c<Enter>
nnoremap c<CR> :source %<CR>

let b:undo_ftplugin .= '|setl fdm<'