Revert "nvim: after: ftplugin: Fix various key mappings"

This reverts commit e6397864d0.

This was actually wrong. nnoremap should be always what we want. For
example, this broke the <Leader>r mapping for gitrebase and would invoke
:Reword from lambdalisue/reword.vim.
This commit is contained in:
Sanchayan Maity 2021-05-29 13:20:00 +05:30
parent 4e2abc80df
commit efe3e7e517
3 changed files with 21 additions and 21 deletions

View file

@ -20,11 +20,11 @@ augroup fe_interactive_rebase_reverse
augroup END
" See https://github.com/neovim/neovim/blob/master/runtime/ftplugin/gitrebase.vim
nmap <buffer> <silent> <Leader>p :Pick<CR>
nmap <buffer> <silent> <Leader>s :Squash<CR>
nmap <buffer> <silent> <Leader>e :Edit<CR>
nmap <buffer> <silent> <Leader>r :Reword<CR>
nmap <buffer> <silent> <Leader>f :Fixup<CR>
nmap <buffer> <silent> <Leader>c :Cycle<CR>
nnoremap <buffer> <silent> <Leader>p :Pick<CR>
nnoremap <buffer> <silent> <Leader>s :Squash<CR>
nnoremap <buffer> <silent> <Leader>e :Edit<CR>
nnoremap <buffer> <silent> <Leader>r :Reword<CR>
nnoremap <buffer> <silent> <Leader>f :Fixup<CR>
nnoremap <buffer> <silent> <Leader>c :Cycle<CR>
setlocal bufhidden=wipe

View file

@ -10,30 +10,30 @@ nmap <buffer> <LocalLeader>k :GhcidKill<CR>
" Taken from https://github.com/danidiaz/miscellany/blob/master/linux/.vim/ftplugin/haskell/movements.vim
" Next top-level type signature
nmap <buffer> <script> <silent> ]f /^\w[^:=$]*\(::\\|\n\s*::\)<CR>
nnoremap <script> <silent> ]f /^\w[^:=$]*\(::\\|\n\s*::\)<CR>
" Previous top-level type signature
nmap <buffer> <script> <silent> [f ?^\w[^:=$]*::\(::\\|\n\s*::\)<CR>
nnoremap <script> <silent> [f ?^\w[^:=$]*::\(::\\|\n\s*::\)<CR>
" Next type signature
nmap <buffer> <script> <silent> ]l /^\s*\w[^:=$]*\(::\\|\n\s*::\)<CR>
nnoremap <script> <silent> ]l /^\s*\w[^:=$]*\(::\\|\n\s*::\)<CR>
" Previous type signature
nmap <buffer> <script> <silent> [l ?^\s*\w[^:=$]*\(::\\|\n\s*::\)<CR>
nnoremap <script> <silent> [l ?^\s*\w[^:=$]*\(::\\|\n\s*::\)<CR>
" Next data declaration
nmap <buffer> <script> <silent> ]t /^\(data \\|newtype \\|type \\|class\)<CR>
nnoremap <script> <silent> ]t /^\(data \\|newtype \\|type \\|class\)<CR>
" Previous data declaration
nmap <buffer> <script> <silent> [t ?^\(data \\|newtype \\|type \\|class\)<CR>
nnoremap <script> <silent> [t ?^\(data \\|newtype \\|type \\|class\)<CR>
" Beginning of imports
nmap <buffer> <script> <silent> [i gg/^import <CR>z<CR>
nnoremap <script> <silent> [i gg/^import <CR>z<CR>
" End of imports
nmap <buffer> <script> <silent> [I G?^import <CR>zb
nnoremap <script> <silent> [I G?^import <CR>zb
" Beginning of module exports
nmap <buffer> <script> <silent> [m gg/^module <CR>z<CR>
nnoremap <script> <silent> [m gg/^module <CR>z<CR>
" End of module exports (wonky)
nmap <buffer> <script> <silent> [M gg/^\s*)\s*where\s*$<CR>zb<CR>
nnoremap <script> <silent> [M gg/^\s*)\s*where\s*$<CR>zb<CR>
" Next named chunk of documentation
" https://www.haskell.org/haddock/doc/html/ch03s05.html
nmap <buffer> <script> <silent> ]n /^-- \$\w\+<CR>z<CR>
nnoremap <script> <silent> ]n /^-- \$\w\+<CR>z<CR>
" Previous named chunk of documentation
nmap <buffer> <script> <silent> [n ?^-- \$\w\+<CR>z<CR>
nnoremap <script> <silent> [n ?^-- \$\w\+<CR>z<CR>
let g:haskell_classic_highlighting = 1
let g:haskell_enable_quantification = 1 " to enable highlighting of `forall`

View file

@ -12,6 +12,6 @@ setlocal nocursorline
setlocal nobuflisted
setlocal nospell
nmap <buffer> [- :colder<CR>
nmap <buffer> ]+ :cnewer<CR>
nmap <buffer> <Leader>g :Cfilter<SPACE>
nnoremap <buffer> [- :colder<CR>
nnoremap <buffer> ]+ :cnewer<CR>
nnoremap <buffer> <Leader>g :Cfilter<SPACE>