summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris <[email protected]>2020-08-07 02:47:48 -0400
committerChris <[email protected]>2020-08-07 02:47:48 -0400
commit0a8ad44a19425da4fb2cb4cfef01fa5d1ea93297 (patch)
treef4fc159ed0f5c7eec97a1179b547c62966a97c45
parentc283a7cb68be4ca85fb546b812bd16bebb27acca (diff)
added far find and replace
-rw-r--r--init.vim1
-rw-r--r--keys/which-key.vim3
-rw-r--r--plug-config/far.vim60
-rw-r--r--syntax/java.vim2
-rw-r--r--vim-plug/plugins.vim1
5 files changed, 64 insertions, 3 deletions
diff --git a/init.vim b/init.vim
index 479fa70d..5ff73bff 100644
--- a/init.vim
+++ b/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
diff --git a/keys/which-key.vim b/keys/which-key.vim
index 587730ca..5e72324b 100644
--- a/keys/which-key.vim
+++ b/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' ]
diff --git a/plug-config/far.vim b/plug-config/far.vim
new file mode 100644
index 00000000..42ba8118
--- /dev/null
+++ b/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)
diff --git a/syntax/java.vim b/syntax/java.vim
index bbbd9af2..1c50746b 100644
--- a/syntax/java.vim
+++ b/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
diff --git a/vim-plug/plugins.vim b/vim-plug/plugins.vim
index 2df833a6..608ecb8e 100644
--- a/vim-plug/plugins.vim
+++ b/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