From fb4bec51f05ef47e56fca2d21acd20b4f38c6010 Mon Sep 17 00:00:00 2001 From: Yan Pritzker Date: Wed, 4 Jan 2017 13:45:57 -0600 Subject: [PATCH 1/2] Add graphql/jsx/fzf --- vim/vundles/languages.vundle | 2 ++ vim/vundles/project.vundle | 1 + 2 files changed, 3 insertions(+) diff --git a/vim/vundles/languages.vundle b/vim/vundles/languages.vundle index 729d32ae..366b28de 100644 --- a/vim/vundles/languages.vundle +++ b/vim/vundles/languages.vundle @@ -5,3 +5,5 @@ Bundle 'jtratner/vim-flavored-markdown.git' Bundle 'scrooloose/syntastic.git' Bundle 'nelstrom/vim-markdown-preview' Bundle 'skwp/vim-html-escape' +Bundle 'mxw/vim-jsx' +Bundle 'jparise/vim-graphql' diff --git a/vim/vundles/project.vundle b/vim/vundles/project.vundle index 308fe05e..d18e021f 100644 --- a/vim/vundles/project.vundle +++ b/vim/vundles/project.vundle @@ -2,5 +2,6 @@ Bundle "jistr/vim-nerdtree-tabs.git" Bundle "scrooloose/nerdtree.git" Bundle "ctrlpvim/ctrlp.vim" Bundle 'JazzCore/ctrlp-cmatcher' +Bundle 'junegunn/fzf' Bundle "xolox/vim-misc" Bundle "xolox/vim-session" From 78da69d421ba3af8f835fdb6aa6c0076154472a2 Mon Sep 17 00:00:00 2001 From: Yan Pritzker Date: Mon, 16 Jan 2017 11:59:52 -0600 Subject: [PATCH 2/2] Remap K to ,k for search so you don't accidentally lock up vim People were complaining that "K" was too easy to hit by accident on a random char and search a large codebase. --- README.md | 4 ++-- vim/settings/search.vim | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 7894fb08..8d321624 100644 --- a/README.md +++ b/README.md @@ -186,7 +186,7 @@ of plugins above to learn more. * `,F` - same as `,f` but in a vertical split * `,gf` or `Ctrl-f` - same as vim normal gf (go to file), but in a vertical split (works with file.rb:123 line numbers also) * `gF` - standard vim mapping, here for completeness (go to file at line number) - * `K` - Search the current word under the cursor and show results in quickfix window + * `,k` - Search the current word under the cursor and show results in quickfix window * `,K` - Grep the current word up to next exclamation point (useful for ruby foo! methods) * `Cmd-*` - highlight all occurrences of current word (similar to regular `*` except doesn't move) * `,hl` - toggle search highlight on and off @@ -200,7 +200,7 @@ of plugins above to learn more. * `gK` - Opens the documentation for the word under the cursor. * Spacebar - Sneak - type two characters to move there in a line. Kind of like vim's `f` but more accurate. * `:Gsearch foo` - global search, then do your normal `%s/search/replace/g` and follow up with `:Greplace` to replace across all files. When done use `:wall` to write all the files. - + #### File Navigation diff --git a/vim/settings/search.vim b/vim/settings/search.vim index 1a6ae84e..82cf075b 100644 --- a/vim/settings/search.vim +++ b/vim/settings/search.vim @@ -10,11 +10,11 @@ function! GetVisual() return selection endfunction -"grep the current word using K (mnemonic Kurrent) -nnoremap K :Ag +"grep the current word using ,k (mnemonic Kurrent) +nnoremap ,k :Ag "grep visual selection -vnoremap K :execute "Ag " . GetVisual() +vnoremap ,k :execute "Ag " . GetVisual() "grep current word up to the next exclamation point using ,K nnoremap ,K viwf!:execute "Ag " . GetVisual()