From 374e3ab69621d03571c36e248ab311c0facffec9 Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 5 Apr 2020 11:54:05 -0400 Subject: auto push --- modules/coc.vim | 16 ++++++++-------- modules/general.vim | 26 +++++++++++++++++--------- modules/markdowm_preview.vim | 4 ++-- modules/vim-which-key.vim | 41 +++++++++++++++++++++++------------------ 4 files changed, 50 insertions(+), 37 deletions(-) (limited to 'modules') diff --git a/modules/coc.vim b/modules/coc.vim index 855127a0..12f553ac 100644 --- a/modules/coc.vim +++ b/modules/coc.vim @@ -21,16 +21,16 @@ set signcolumn=yes "better nav for omnicomplete inoremap ("\") -inoremap ("\") +inoremap ("\") " Use tab for trigger completion with characters ahead and navigate. " NOTE: Use command ':verbose imap ' to make sure tab is not mapped by " other plugin before putting this into your config. -inoremap - \ pumvisible() ? "\" : - \ check_back_space() ? "\" : - \ coc#refresh() -inoremap pumvisible() ? "\" : "\" +"inoremap + "\ pumvisible() ? "\" : + "\ check_back_space() ? "\" : + "\ coc#refresh() +"inoremap pumvisible() ? "\" : "\" function! s:check_back_space() abort let col = col('.') - 1 @@ -108,8 +108,8 @@ omap af (coc-funcobj-a) " Use for selections ranges. " NOTE: Requires 'textDocument/selectionRange' support from the language server. " coc-tsserver, coc-python are the examples of servers that support it. -nmap (coc-range-select) -xmap (coc-range-select) +"nmap (coc-range-select) +"xmap (coc-range-select) " Add `:Format` command to format current buffer. command! -nargs=0 Format :call CocAction('format') diff --git a/modules/general.vim b/modules/general.vim index fdcb226b..42f1e7a7 100644 --- a/modules/general.vim +++ b/modules/general.vim @@ -4,10 +4,9 @@ if &compatible endif " set leader key -let g:mapleader="\\" -" alias for leader key -nmap \ -xmap \ +let g:mapleader = "\" +" set local leader key +let g:maplocalleader = ',' syntax enable " Enables syntax highlighing set hidden " Required for specific actions that require multiple buffers @@ -23,7 +22,7 @@ set splitbelow " Horizontal splits will automatically b set splitright " Vertical splits will automatically be to the right set t_Co=256 " Support 256 colors set autochdir " Your working directory will always be the same as your working directory -set conceallevel=0 " So that I can see `` in markdown files +set conceallevel=0 " So that I can see `` in markdown files set tabstop=2 " Insert 2 spaces for a tab set shiftwidth=2 " Change the number of space characters inserted for indentation set smarttab " Makes tabbing smarter will realize you have 2 vs 4 @@ -35,7 +34,6 @@ set number " Line numbers set cursorline " Enable highlighting of the current line set background=dark " tell vim what the background color looks like -let g:python_highlight_all = 0 " Get rid of annoying red highlights" look into polyglot python implementation to choose what you want to enable let g:elite_mode=1 " Disable arrows" filetype plugin indent on " Gives vim abilty to recognize filetypes @@ -83,15 +81,25 @@ nnoremap j nnoremap k nnoremap l +" I hate escape more than anything else +inoremap jk +inoremap kj +" This is how much I hate it +inoremap + +" Easy CAPS +inoremap viwUi +nnoremap viwU + " TAB in general mode will move to text buffer nnoremap :VimwikiNextLink " SHIFT-TAB will go back nnoremap :VimwikiPrevLink -nmap wn VimwikiNextLink -nmap wp VimwikiPrevLink -< + +"nmap wn VimwikiNextLink +"nmap wp VimwikiPrevLink " TAB in general mode will move to text buffer nnoremap :bnext " SHIFT-TAB will go back diff --git a/modules/markdowm_preview.vim b/modules/markdowm_preview.vim index 1ec85362..0a87f897 100644 --- a/modules/markdowm_preview.vim +++ b/modules/markdowm_preview.vim @@ -1,11 +1,11 @@ " set to 1, nvim will open the preview window after entering the markdown buffer " default: 0 -let g:mkdp_auto_start = 1 +let g:mkdp_auto_start = 0 " set to 1, the nvim will auto close current preview window when change " from markdown buffer to another buffer " default: 1 -let g:mkdp_auto_close = 1 +let g:mkdp_auto_close = 0 " set to 1, the vim will refresh markdown when save the buffer or " leave from insert mode, default 0 is auto refresh markdown as you edit or diff --git a/modules/vim-which-key.vim b/modules/vim-which-key.vim index 38605729..2a76c339 100644 --- a/modules/vim-which-key.vim +++ b/modules/vim-which-key.vim @@ -7,8 +7,6 @@ let g:which_key_sep = '→' " By default timeoutlen is 1000 ms set timeoutlen=100 -let g:mapleader = "\" -let g:maplocalleader = ',' let g:which_key_map = {} "let g:which_key_default_group_name = '' @@ -29,18 +27,24 @@ endfun "nnoremap bashrc :call OpenConfigFile('~/.bashrc') "nnoremap code :call OpenConfigFile('~/Library/Application Support/Code/User/settings.json') -let g:which_key_map['/'] = [ 'NERDCommenterToggle', 'commenter' ] -let g:which_key_map['e'] = [ 'NERDTreeToggle', 'file-explorer' ] -let g:which_key_map['p'] = [ 'pclose' , 'close-preview' ] -let g:which_key_map['q'] = [ 'q' , 'quit' ] -let g:which_key_map['d'] = [ 'bd' , 'delete-buffer' ] -let g:which_key_map['s'] = [ 'w' , 'save' ] -let g:which_key_map['r'] = [ 'Ranger' , 'ranger' ] -let g:which_key_map['f'] = [ 'FZF' , 'fzf' ] -let g:which_key_map['z'] = [ 'Goyo' , 'zen-mode' ] -let g:which_key_map['v'] = ['v' , 'split-window-right'] -let g:which_key_map['h'] = ['s' , 'split-window-below'] -let g:which_key_map['o'] = ['only' , 'close-all-other-windows'] +nnoremap " viwa"bi"lel +let g:which_key_map['/'] = [ 'NERDCommenterToggle' , 'commenter' ] +let g:which_key_map['e'] = [ 'NERDTreeToggle' , 'file-explorer' ] +let g:which_key_map['p'] = [ 'pclose' , 'close-preview' ] +let g:which_key_map['q'] = [ 'q' , 'quit' ] +let g:which_key_map['d'] = [ 'bd' , 'delete-buffer' ] +let g:which_key_map['s'] = [ 'w' , 'save' ] +let g:which_key_map['r'] = [ 'Ranger' , 'ranger' ] +let g:which_key_map['f'] = [ 'FZF' , 'fzf' ] +let g:which_key_map['z'] = [ 'Goyo' , 'zen-mode' ] +let g:which_key_map['v'] = ['v' , 'split-window-right'] +let g:which_key_map['h'] = ['s' , 'split-window-below'] +let g:which_key_map['o'] = ['only' , 'close-all-other-windows'] +"let g:which_key_map[','] = ['vsplit $NVIMRC ' , 'open-init.vim'] +"let g:which_key_map['.'] = ['source $NVIMRC ' , 'source-init.vim'] +let g:which_key_map['"'] = ['viwa"bi"lel' , 'surround'] +" Surround in \"" +nnoremap " viwa"bi"lel let g:which_key_map.t = { \ 'name' : '+toggle' , @@ -48,11 +52,12 @@ let g:which_key_map.t = { \ 'b' : ['TagbarToggle' , 'tagbar'] , \ 'n' : [':set nonumber!' , 'line-numbers'] , \ 'r' : [':set norelativenumber!' , 'rel-line-numbers'] , - \ 's' : [':let @/ = ""' , 'remove-search-highlight'] , + \ 's' : [':let @/ = ""' , 'remove-search-highlight'] , \ 'c' : ['ColorToggle' , 'remove-color'] , - \ 't' : [':6sp term://zsh' , 'terminal'] , + \ 't' : [':6sp term://zsh' , 'terminal'] , \ } + let g:which_key_map.l = { \ 'name' : '+lsp' , \ 'c' : ['LanguageClient_contextMenu()' , 'context_menu'] , @@ -85,8 +90,8 @@ let g:which_key_map.b = { \ 'n' : ['bnext' , 'next-buffer'] , \ 'p' : ['bprevious' , 'previous-buffer'] , \ '?' : ['Buffers' , 'fzf-buffer'] , - \ 's' : ['Startify' , 'Startify'] , - \ 'g' : ['Goyo' , 'Goyo'] , + \ 's' : ['Startify' , 'Startify'] , + \ 'g' : ['Goyo' , 'Goyo'] , \ } call which_key#register('', "g:which_key_map") -- cgit v1.2.3