Skip to content

Commit

Permalink
added far find and replace
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris committed Aug 7, 2020
1 parent c283a7c commit 0a8ad44
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 3 deletions.
1 change: 1 addition & 0 deletions init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion keys/which-key.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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' ]
Expand Down
60 changes: 60 additions & 0 deletions plug-config/far.vim
Original file line number Diff line number Diff line change
@@ -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)
2 changes: 0 additions & 2 deletions syntax/java.vim
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ let cyan = "#56B6C2"
let white = "#ABB2BF"



" you may chage the color according to your will :)


Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions vim-plug/plugins.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit 0a8ad44

Please sign in to comment.