summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.vim2
-rw-r--r--modules/coc.vim16
-rw-r--r--modules/general.vim26
-rw-r--r--modules/markdowm_preview.vim4
-rw-r--r--modules/vim-which-key.vim41
5 files changed, 52 insertions, 37 deletions
diff --git a/init.vim b/init.vim
index d33664af..33d41e10 100644
--- a/init.vim
+++ b/init.vim
@@ -25,3 +25,5 @@ source $HOME/.config/nvim/modules/sneak.vim
"source $HOME/.config/nvim/modules/pydocstring.vim
"source $HOME/.config/nvim/modules/neosnippets.vim " I need to do my homework on snippets
"source $HOME/.config/nvim/modules/vim_wiki.vim
+echo ">^.^<"
+
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")