summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEkaitz Zarraga <ekaitz@elenq.tech>2021-04-18 00:34:02 +0200
committerEkaitz Zarraga <ekaitz@elenq.tech>2021-04-18 00:34:02 +0200
commit7fa0b2742ebcdeebc83fd315ea35b0ce3b28b8bd (patch)
tree3f5061886c3ac65d8c18fcd12987951f7d9c0758
parentc0b5058b78438f52d9593e97b031fc6272c2f674 (diff)
NVim search enhancements
-rw-r--r--nvim/nvim/init.vim20
1 files changed, 20 insertions, 0 deletions
diff --git a/nvim/nvim/init.vim b/nvim/nvim/init.vim
index 1f558e4..e11f18a 100644
--- a/nvim/nvim/init.vim
+++ b/nvim/nvim/init.vim
@@ -48,6 +48,12 @@ call vundle#end() " required
" Activate syntax highlighting by default
syntax on
+" Keep 10 lines of space from the cursor to the window corners
+set scrolloff=10
+
+" Show completion in a menu
+set wildmenu
+
" Enable TRUE COLORS
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
let $NVIM_TUI_ENABLE_CURSOR_SHAPE=1
@@ -128,6 +134,20 @@ set nomodeline
" SEARCH
+" Search through files in the current tree (like :find)
+set path+=**
+
+" Make ctags so we can search with ^] and g^] and ^t
+command! MakeTags !ctags -R .
+
+" Use ripgrep as search tool
+if executable("rg")
+ set grepprg=rg\ --vimgrep\ --no-heading
+ set grepformat=%f:%l:%c:%m,%f:%l:%m
+endif
+
+command! -nargs=+ Sgrep execute 'silent grep! <args>' | copen 10
+
" HighLight search
set hlsearch