diff options
| author | Chris <[email protected]> | 2020-04-05 11:54:05 -0400 | 
|---|---|---|
| committer | Chris <[email protected]> | 2020-04-05 11:54:05 -0400 | 
| commit | 374e3ab69621d03571c36e248ab311c0facffec9 (patch) | |
| tree | 0203e7770a29396dc9651ccf2935d0677a7a8952 /modules | |
| parent | e1ce0a2f9656b8f44dca2f92afaa2cfda17222f3 (diff) | |
auto push
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/coc.vim | 16 | ||||
| -rw-r--r-- | modules/general.vim | 26 | ||||
| -rw-r--r-- | modules/markdowm_preview.vim | 4 | ||||
| -rw-r--r-- | modules/vim-which-key.vim | 41 | 
4 files changed, 50 insertions, 37 deletions
| 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 <expr> <c-j> ("\<C-n>") -inoremap <expr> <c-k> ("\<C-p>") +inoremap <expr> <c-k> ("\<C-p>")    " Use tab for trigger completion with characters ahead and navigate.  " NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by  " other plugin before putting this into your config. -inoremap <silent><expr> <TAB> -      \ pumvisible() ? "\<C-n>" : -      \ <SID>check_back_space() ? "\<TAB>" : -      \ coc#refresh() -inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>" +"inoremap <silent><expr> <TAB> +      "\ pumvisible() ? "\<C-n>" : +      "\ <SID>check_back_space() ? "\<TAB>" : +      "\ coc#refresh() +"inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"  function! s:check_back_space() abort    let col = col('.') - 1 @@ -108,8 +108,8 @@ omap af <Plug>(coc-funcobj-a)  " Use <TAB> 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 <silent> <TAB> <Plug>(coc-range-select) -xmap <silent> <TAB> <Plug>(coc-range-select) +"nmap <silent> <TAB> <Plug>(coc-range-select) +"xmap <silent> <TAB> <Plug>(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 <space> \ -xmap <space> \ +let g:mapleader = "\<Space>" +" 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 <D-j> <C-w>j  nnoremap <D-k> <C-w>k  nnoremap <D-l> <C-w>l +" I hate escape more than anything else +inoremap jk <Esc> +inoremap kj <Esc> +" This is how much I hate it +inoremap <esc> <nop> + +" Easy CAPS +inoremap <c-u> <ESC>viwUi +nnoremap <c-u> viwU<Esc> +  " TAB in general mode will move to text buffer  nnoremap <C-TAB> :VimwikiNextLink<CR>  " SHIFT-TAB will go back  nnoremap <C-S-TAB> :VimwikiPrevLink<CR> -nmap <Leader>wn <Plug>VimwikiNextLink -nmap <Leader>wp <Plug>VimwikiPrevLink -< + +"nmap <Leader>wn <Plug>VimwikiNextLink +"nmap <Leader>wp <Plug>VimwikiPrevLink  " TAB in general mode will move to text buffer  nnoremap <TAB> :bnext<CR>  " 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 = "\<Space>" -let g:maplocalleader = ','  let g:which_key_map =  {}  "let g:which_key_default_group_name = '' @@ -29,18 +27,24 @@ endfun  "nnoremap <silent> <leader>bashrc :call OpenConfigFile('~/.bashrc')<cr>  "nnoremap <silent> <leader>code :call OpenConfigFile('~/Library/Application Support/Code/User/settings.json')<cr> -let g:which_key_map['/'] = [ '<Plug>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'] = ['<C-W>v'     , 'split-window-right'] -let g:which_key_map['h'] = ['<C-W>s'     , 'split-window-below'] -let g:which_key_map['o'] = ['only'       , 'close-all-other-windows'] +nnoremap <leader>" viw<esc>a"<esc>bi"<esc>lel +let g:which_key_map['/'] = [ '<Plug>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'] = ['<C-W>v'                      , 'split-window-right'] +let g:which_key_map['h'] = ['<C-W>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['"'] = ['viw<esc>a"<esc>bi"<esc>lel'  , 'surround'] +" Surround in \"" +nnoremap <leader>" viw<esc>a"<esc>bi"<esc>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('<Space>', "g:which_key_map") | 
