From dec61653987f584822f87515281e9f82aaac972f Mon Sep 17 00:00:00 2001 From: ben Date: Sat, 3 May 2025 14:25:55 -0700 Subject: old neovim config --- config/nvim-archive/external_settings/mappings.vim | 97 ++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 config/nvim-archive/external_settings/mappings.vim (limited to 'config/nvim-archive/external_settings/mappings.vim') diff --git a/config/nvim-archive/external_settings/mappings.vim b/config/nvim-archive/external_settings/mappings.vim new file mode 100644 index 0000000..8a66525 --- /dev/null +++ b/config/nvim-archive/external_settings/mappings.vim @@ -0,0 +1,97 @@ +" ----- Tabs ----- " +nnoremap :tabnew +nnoremap :tabclose +noremap :tabnext +inoremap :tabnext +cnoremap :tabnext +noremap ::tabprevious +inoremap :tabprevious +cnoremap :tabprevious + +" unmap +command! W +command! Q :wq! + + +" NvimTRee +noremap n :NvimTreeToggle + +" -- Comments -- " +vmap C ToggleCommaround +vmap c ToggleCommaround + +" Code Block Scope +nnoremap es :IBLToggle + +" -- Todo Comments search -- " +nnoremap cf :TodoTelescope + +" Delete entire word with CTRL-BS or CTRL-H +noremap! +noremap! +inoremap db + +" -- Coc -- " +nnoremap ce :CocEnable +nnoremap cd :CocDisable + +" -- CSS -- " +au FileType css inoremap { {}A +au FileType css map * I/*A*/ + +" Don't leave block indentation +vmap < >gv + +" Compilation +map m :!make + + +" List all URLS in a file +nnoremap u :Urlview + +" FZF " +nnoremap f :FZF + +" Code Search (silver searcher) " +nnoremap cs :Ag + +" function! ToggleAg() +" if exists("t:fzf_window") +" " If the fzf window exists, close it +" call fzf#vim#cancel() +" else +" " Otherwise, open the fzf window with a prompt for input +" call fzf#vim#ag('', fzf#vim#with_preview()) +" endif +" endfunction +" +" Code Search (silver searcher) " +" nnoremap cs :call ToggleAg() +" + + + +" Enable Spell Check +map s :setlocal spell! spelllang=en_us + +map p :!opout % + +" Undo Tree +nnoremap :UndotreeToggle + +" NERD TREE + nnoremap :NERDTreeToggle + +" Telescope + " Find files using Telescope command-line sugar. + nnoremap ff Telescope find_files + nnoremap fg Telescope live_grep + nnoremap fb Telescope buffers + nnoremap fh Telescope help_tags + + " Using Lua functions + nnoremap ff lua require('telescope.builtin').find_files() + nnoremap fg lua require('telescope.builtin').live_grep() + nnoremap fb lua require('telescope.builtin').buffers() + nnoremap fh lua require('telescope.builtin').help_tags() -- cgit v1.2.3