nixpkgs/home/programs/neovim/configuration/plugin/mappings.vim
Daniel Siepmann 774e4f8555
Rename Neovim custom telescope
The keyboard shortcut was already in use.
I therefore renamed custom_functions into custom runs.
That way I can add multiple things in the future.
E.g. the items to select can also be a table which defines the name as
well as what to execute. That way I could add functions, commands and
other things.
2022-03-23 16:37:26 +01:00

45 lines
1.3 KiB
VimL

" Custom Mapping / Key bindings
let mapleader = ","
nnoremap H ^
nnoremap L $
" Toggle paste mode
nnoremap <leader>v :set paste!<cr>
" Stop highlighting of search results.
nnoremap <leader>nh :nohlsearch<cr>
" Configure navigation, e.g. go to buffer, file, ...
nnoremap <leader>pp :Telescope builtin<cr>
nnoremap <leader>pf :Telescope git_files<cr>
nnoremap <leader>pb :Telescope buffers<cr>
nnoremap <leader>pt :Telescope ctags_outline outline<cr>
nnoremap <leader>pr :Telescope custom_runs<cr>
nnoremap <silent> <leader>pc :call TelescopeCurrentComposerPackage()<cr>
nnoremap <leader>k :NERDTreeToggle<cr>
nnoremap <leader>f :NERDTreeFind<cr>
nnoremap <leader>b :TagbarToggle<cr>
nnoremap <leader>u :UndotreeToggle<cr>
nnoremap <leader>a :PhpactorContextMenu<cr>
nnoremap <leader>au :PhpactorImportClass<cr>
nnoremap <leader>ag :PhpactorGotoDefinition<cr>
nnoremap <leader>ah :PhpactorHover<cr>
nnoremap <silent> <leader>tn :TestNearest<cr>
nnoremap <silent> <leader>tl :TestLast<cr>
nnoremap <silent> <leader>tf :TestFile<cr>
nnoremap <leader>so :call SortParagraph()<cr>
nnoremap <silent> <leader>gtt :call OpenPHPUnitTestFilename()<cr>
" Terminal helpers
nnoremap <silent> <leader>e :TREPLSendLine<cr>
vnoremap <silent> <leader>e :TREPLSendSelection<cr>
nmap <leader>db :python3 debugger.run()<cr>
" Escape of terminal more esily.
tnoremap <Esc> <C-\><C-n>