Merge branch 'master' of git.maggioni.xyz:maggicl/nvim-config
This commit is contained in:
commit
cfcc1617a6
3 changed files with 35 additions and 5 deletions
3
.gitmodules
vendored
3
.gitmodules
vendored
|
@ -28,3 +28,6 @@
|
||||||
[submodule "pack/plugins/start/vim-grepper"]
|
[submodule "pack/plugins/start/vim-grepper"]
|
||||||
path = pack/plugins/start/vim-grepper
|
path = pack/plugins/start/vim-grepper
|
||||||
url = https://github.com/mhinz/vim-grepper.git
|
url = https://github.com/mhinz/vim-grepper.git
|
||||||
|
[submodule "pack/plugins/start/vim-go"]
|
||||||
|
path = pack/plugins/start/vim-go
|
||||||
|
url = https://github.com/fatih/vim-go.git
|
||||||
|
|
36
init.vim
36
init.vim
|
@ -28,7 +28,13 @@ set autoindent
|
||||||
|
|
||||||
" Make :find work on all files in :pwd
|
" Make :find work on all files in :pwd
|
||||||
set path+=**
|
set path+=**
|
||||||
set wildignore+=**/node_modules/**
|
set wildignore+=**/node_modules/**,*~
|
||||||
|
|
||||||
|
" set netrw preferred style to tree
|
||||||
|
let g:netrw_liststyle = 3
|
||||||
|
|
||||||
|
" remove netrw top banner
|
||||||
|
let g:netrw_banner = 0
|
||||||
|
|
||||||
" ADDITIONAL COMMANDS
|
" ADDITIONAL COMMANDS
|
||||||
|
|
||||||
|
@ -77,14 +83,21 @@ nnoremap <Leader>g :Grepper -tool git<CR>
|
||||||
" Switch between Windows with: Leader w
|
" Switch between Windows with: Leader w
|
||||||
nnoremap <Leader>w <C-w><C-w>
|
nnoremap <Leader>w <C-w><C-w>
|
||||||
|
|
||||||
" Show next buffer with: Leader n
|
" show next buffer with: leader n
|
||||||
nnoremap <Leader>n :bn<CR>
|
nnoremap <leader>n :bn<cr>
|
||||||
|
|
||||||
|
" show previous buffer with: leader n
|
||||||
|
nnoremap <leader>p :bp<cr>
|
||||||
|
|
||||||
" Fix indentation with: Leader i
|
" Fix indentation with: Leader i
|
||||||
nnoremap <Leader>i mzgg=G`z
|
nnoremap <Leader>i mzgg=G`z
|
||||||
|
|
||||||
" Delete buffer with: Leader d
|
" Delete buffer with: Leader d
|
||||||
nnoremap <Leader>d :bd<CR>
|
nnoremap <Leader>d :bp\|bd #<CR>
|
||||||
|
|
||||||
|
" move to next tab with: Leader t
|
||||||
|
nnoremap <Leader>t :tabnext<CR>
|
||||||
|
tnoremap <C-e> <C-\><C-n>:tabnext<CR>
|
||||||
|
|
||||||
" clear trailing spaces in file
|
" clear trailing spaces in file
|
||||||
function! g:ClearTrailingSpaces()
|
function! g:ClearTrailingSpaces()
|
||||||
|
@ -93,7 +106,7 @@ function! g:ClearTrailingSpaces()
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" remove trailing spaces with: Leader t s
|
" remove trailing spaces with: Leader t s
|
||||||
nnoremap <silent> <Leader>ts :call ClearTrailingSpaces()<CR>
|
nnoremap <silent> <Leader>s :call ClearTrailingSpaces()<CR>
|
||||||
|
|
||||||
" automatically remove trailing spaces when saving a file
|
" automatically remove trailing spaces when saving a file
|
||||||
autocmd BufWrite * call ClearTrailingSpaces()
|
autocmd BufWrite * call ClearTrailingSpaces()
|
||||||
|
@ -104,6 +117,19 @@ nnoremap <Leader>R :source ~/.config/nvim/init.vim<CR>
|
||||||
" show Vim's true competitor with: Leader r c m
|
" show Vim's true competitor with: Leader r c m
|
||||||
nnoremap <Leader>rcm :!open https://youtu.be/jn40Ugz0vuk<CR><CR>
|
nnoremap <Leader>rcm :!open https://youtu.be/jn40Ugz0vuk<CR><CR>
|
||||||
|
|
||||||
|
" open netrw in directory of current file
|
||||||
|
nnoremap <Leader>e :Ex<CR>
|
||||||
|
|
||||||
|
" close quickfix window with: Leader Q
|
||||||
|
nnoremap <Leader>Q :ccl<CR>
|
||||||
|
|
||||||
|
" Go files: launch go lint quickfix with: Leader q
|
||||||
|
autocmd FileType go nnoremap <Leader>q :w<CR>:GoLint<CR>
|
||||||
|
|
||||||
|
" TypeScript files: launch TypeScript lint quickfix with: Leader q
|
||||||
|
autocmd FileType typescript nnoremap <Leader>q :TsuQuickFix<CR>
|
||||||
|
|
||||||
|
|
||||||
" COLORSCHEME
|
" COLORSCHEME
|
||||||
|
|
||||||
" set colorscheme to onedark.im for nvim and airline
|
" set colorscheme to onedark.im for nvim and airline
|
||||||
|
|
1
pack/plugins/start/vim-go
Submodule
1
pack/plugins/start/vim-go
Submodule
|
@ -0,0 +1 @@
|
||||||
|
Subproject commit a61545f09cad6df2e7a4918cbd6981811f612ae9
|
Reference in a new issue