Parcourir la source

added far find and replace

Chris il y a 5 ans
Parent
commit
0a8ad44a19
5 fichiers modifiés avec 64 ajouts et 3 suppressions
  1. 1 0
      init.vim
  2. 2 1
      keys/which-key.vim
  3. 60 0
      plug-config/far.vim
  4. 0 2
      syntax/java.vim
  5. 1 0
      vim-plug/plugins.vim

+ 1 - 0
init.vim

@@ -40,6 +40,7 @@ else
   source $HOME/.config/nvim/plug-config/vista.vim
   source $HOME/.config/nvim/plug-config/xtabline.vim
   source $HOME/.config/nvim/plug-config/polyglot.vim
+  source $HOME/.config/nvim/plug-config/far.vim
   luafile $HOME/.config/nvim/lua/plug-colorizer.lua
 endif
 

+ 2 - 1
keys/which-key.vim

@@ -32,8 +32,9 @@ let g:which_key_map['='] = [ '<C-W>='                     , 'balance windows' ]
 let g:which_key_map[','] = [ 'Startify'                   , 'start screen' ]
 let g:which_key_map['d'] = [ ':bd'                        , 'delete buffer']
 let g:which_key_map['e'] = [ ':CocCommand explorer'       , 'explorer' ]
-let g:which_key_map['f'] = [ ':Files'                     , 'search files' ]
+let g:which_key_map['f'] = [ ':Farr'                      , 'find and replace' ]
 let g:which_key_map['h'] = [ '<C-W>s'                     , 'split below']
+let g:which_key_map['p'] = [ ':Files'                     , 'search files' ]
 let g:which_key_map['q'] = [ 'q'                          , 'quit' ]
 let g:which_key_map['r'] = [ ':RnvimrToggle'              , 'ranger' ]
 let g:which_key_map['S'] = [ ':SSave'                     , 'save session' ]

+ 60 - 0
plug-config/far.vim

@@ -0,0 +1,60 @@
+let g:far#source='rgnvim'
+
+let g:far#file_mask_favorites=['%', '**/*.*', '**/*.html', '**/*.js', '**/*.css', '**/*.vim']
+
+let g:far#enable_undo=1
+
+
+
+
+"     Below are the default mappings and corresponding variable names in
+
+" x v_x   - Exclude item under the cursor.
+
+" i v_i   - Include item under the cursor.
+
+" t v_t   - Toggle item exclusion under the cursor.
+
+" f v_f   - Smartly toggle item exclusion under the cursor: exclude all items when all are excluded, otherwise exclude all items.
+
+" X       - Exclude all items.
+
+" I       - Include all items.
+
+" T       - Toggle exclusion for all items.
+
+" F       - Smartly toggle exclusion for all items: include all items when all are excluded, otherwise exclude all items.
+
+" <CR>    - Jump to the source code of the item under the cursor. See |far-jump|
+
+" p       - Open preview window (if not) and scroll to the item under the cursor. See |far-preview|
+
+" P       - Close preview window. See |far-preview|
+
+" CTRL-K  - Scroll preview window up (if open). See |far-preview|, |g:far#preview_window_scroll_step|
+
+" CTRL-J  - Scroll preview window down (if open). See |far-preview|, |g:far#preview_window_scroll_step|
+
+" zo      - Expand node under the cursor.
+
+" zc      - Collapse node under the cursor.
+
+" za      - Toggle node expanding under the cursor.
+
+" zs      - Smartly toggle exclusion for all nodes: expand all nodes when all are collapsed, otherwise collapse all nodes.
+
+" zr v_zr - Expand all nodes.
+
+" zm v_zm - Collapse all nodes.
+
+" zA v_zA - Toggle exclusion for all nodes.
+
+" zS v_zS - Smartly toggle exclusion for all nodes: expand all nodes when all are collapsed, otherwise collapse all nodes.
+
+" s v_s   - Execute |:Fardo|<CR>, to replace all included items.
+
+" u v_s   - Execute |:Farundo|<CR>, to undo the last replacement by |:Fardo|.
+
+" U v_U   - Execute |:Farundo| --all=1<CR>, to undo all replacements by |:Fardo|. For param '--all=' see |farundo-params|.
+
+" q v_q   - Close searching result buffer and its preview buffer (if exists)

+ 0 - 2
syntax/java.vim

@@ -32,7 +32,6 @@ let cyan = "#56B6C2"
 let white = "#ABB2BF"
 
 
-
 " you may chage the color according to your will :)
 
 
@@ -52,7 +51,6 @@ execute "highlight class ctermfg=4  guifg=".blue
 syn match main "\v(\a)\w*\d"
 execute "highlight main ctermfg=4  guifg=".red
 
-
 "all regrex works
 " /^import (+);$/mg 
 " import \zs.*\ze

+ 1 - 0
vim-plug/plugins.vim

@@ -104,6 +104,7 @@ call plug#begin('~/.config/nvim/autoload/plugged')
     Plug 'mg979/vim-xtabline'
     Plug 'mbbill/undotree'
     Plug 'RRethy/vim-illuminate'
+    Plug 'brooth/far.vim'
   endif