Skip to content

Commit

Permalink
Add add some new neovim features
Browse files Browse the repository at this point in the history
  • Loading branch information
tdmanv committed May 6, 2023
1 parent 5d900f5 commit d9fbe52
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions bash_aliases
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
alias xclip='xclip -selection c'
alias vim='nvim'
15 changes: 9 additions & 6 deletions init.vim
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,8 @@ endif

cnoremap <C-P> <C-R>=expand("%:p:h") . "/" <CR>
nnoremap <silent> <leader>b :Buffers<CR>
nnoremap <silent> <leader>e :FZF -m<CR>
" Modified from <leader>e
nnoremap <silent> <leader>j :FZF -m<CR>
"Recovery commands from history through FZF
nmap <leader>y :History:<CR>
Expand Down Expand Up @@ -636,29 +637,31 @@ endif
"" My Modifications
"*****************************************************************************

map Y y$
" Fast editing of the .vimrc
map <leader>e :tabnew! ~/.vimrc<cr>
map <leader>e :tabnew! ~/.config/nvim/init.vim<cr> :vsp ~/.vimrc<cr>
" When vimrc is edited, reload it
autocmd! bufwritepost .vimrc source ~/.vimrc

" Tab configuration
map <leader>tn :tabnew<cr>
map <leader>te :tabedit
map <leader>tc :tabclose<cr>
map <leader>tm :tabmove
" Git helpers
vmap b :!git blame =expand("%:p") \| sed -n =line("',=line("'>") p
autocmd BufRead .git/COMMIT_EDITMSG setlocal spell
autocmd BufRead .git/COMMIT_EDITMSG set tw=70
map Y y$

" vim-go mappings
au FileType go map <leader>gp :GoImports<CR>
au FileType go map <leader>gi :GoImplements<CR>
au FileType go map <leader>gb :GoDescribe<CR>
au FileType go map <leader>gd :tabedit %<CR>gT:GoDef<CR>
" Silver Searcher mappings
nmap <leader>a lb"tye:Ag <C-r>t<CR>



Expand Down

0 comments on commit d9fbe52

Please sign in to comment.