Merge branch 'master' of git.maggioni.xyz:maggicl/nvim-config

This commit is contained in:
Claudio Maggioni (maggicl) 2019-02-02 23:27:13 +01:00
commit cfcc1617a6
3 changed files with 35 additions and 5 deletions

3
.gitmodules vendored
View File

@ -28,3 +28,6 @@
[submodule "pack/plugins/start/vim-grepper"]
path = pack/plugins/start/vim-grepper
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

View File

@ -28,7 +28,13 @@ set autoindent
" Make :find work on all files in :pwd
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
@ -77,14 +83,21 @@ nnoremap <Leader>g :Grepper -tool git<CR>
" Switch between Windows with: Leader w
nnoremap <Leader>w <C-w><C-w>
" Show next buffer with: Leader n
nnoremap <Leader>n :bn<CR>
" show next buffer with: leader n
nnoremap <leader>n :bn<cr>
" show previous buffer with: leader n
nnoremap <leader>p :bp<cr>
" Fix indentation with: Leader i
nnoremap <Leader>i mzgg=G`z
" 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
function! g:ClearTrailingSpaces()
@ -93,7 +106,7 @@ function! g:ClearTrailingSpaces()
endfunction
" 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
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
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
" set colorscheme to onedark.im for nvim and airline

@ -0,0 +1 @@
Subproject commit a61545f09cad6df2e7a4918cbd6981811f612ae9