-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc_plug
42 lines (32 loc) · 1.56 KB
/
.vimrc_plug
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
" Initialize Vim-Plug (a plugin manager)
call plug#begin()
Plug 'junegunn/fzf' " Core FZF (command-line fuzzy finder)
Plug 'junegunn/fzf.vim' " Vim integration for FZF
Plug 'vim-scripts/LargeFile' " Plugin to handle large files efficiently:
Plug 'scrooloose/nerdtree' " NERDTree for browsing files and directories
Plug 'RRethy/vim-illuminate' " highlight current word
call plug#end()
" -------- Key Mappings --------
map <leader>f :Files<CR> " Search for files in the current directory
map <leader>b :Buffers<CR> " Search and switch between open buffers
nnoremap <leader>g :Rg<CR> " Search for text using Ripgrep (requires `rg` installed)
nnoremap <leader>t :Tags<CR> " Search for tags (useful for code navigation)
nnoremap <leader>m :Marks<CR> " Show and navigate marks (saved cursor positions)
" Search the word under cursor using Ag (another fast text search tool)
nnoremap <silent> <Leader>ag :Ag <C-R><C-W><CR>
" -------- FZF Configuration --------
let g:fzf_vim = {} " Initialize an empty dictionary for FZF settings
let g:fzf_vim.preview_window = ['right,50%,wrap', 'ctrl-/']
" Configure FZF preview:
" - Show preview on the right side
" - Use 50% of the window width
" - Wrap long lines in the preview
" - Use 'Ctrl-/' to toggle preview visibility
" -------- NERDTree Configuration --------
" Open/close NERDTree with Ctrl-n
map <C-n> :NERDTreeToggle<CR>
" Find the current file in NERDTree with Ctrl-l
map <C-l> :NERDTreeFind<CR>
" Disable arrows in the NERDTree UI (for a cleaner look)
let g:NERDTreeDirArrows=0
hi illuminatedWord cterm=underline gui=underline