commit 8fc2e979722ce7c67bc9317077742d3154bb5c4a
parent ced5b5ed63fd6a4e707a2e3e5eb9f3b1e8959817
Author: oscarbenedito <oscar@obenedito.org>
Date:   Sat, 25 Jan 2020 23:06:20 +0100

Vim and zsh stuff

Diffstat:
Mdot_vimrc | 25++++++++++++++++---------
Mdot_zshrc | 4++++
2 files changed, 20 insertions(+), 9 deletions(-)

diff --git a/dot_vimrc b/dot_vimrc @@ -1,5 +1,6 @@ call plug#begin('~/.vim/plugged') Plug 'junegunn/goyo.vim' " minimalist design, nice for writing text +Plug 'preservim/nerdtree' " file tree call plug#end() " commands for latex-suite @@ -14,6 +15,9 @@ autocmd BufRead,BufNewFile *.tex set filetype=tex autocmd BufRead,BufNewFile *.cls set filetype=tex autocmd BufRead,BufNewFile *.sty set filetype=tex +" nerd tree shortcut +map <C-n> :NERDTreeToggle<CR> + " indentation set expandtab set shiftwidth=2 @@ -41,6 +45,9 @@ map <C-j> <C-w>j map <C-k> <C-w>k map <C-l> <C-w>l +" key bindings +nnoremap U <C-r> + " set up colorscheme colorscheme onedark set t_ut="" " deactivates vim BCE option (messes up colors) @@ -55,19 +62,19 @@ if (empty($TMUX)) " 24-bit true-color configuration endif " set up status line -function! GitBranch() - let l:branchname = system("cd '".expand('%:p:h')."' && git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'") - return strlen(l:branchname) > 0?' '.l:branchname.' ':'' -endfunction +" function! GitBranch() +" let l:branchname = system("cd '".expand('%:p:h')."' && git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'") +" return strlen(l:branchname) > 0?' '.l:branchname.' ':'' +" endfunction -let gitbranch={} -autocmd BufRead,BufNewFile,FileReadPre * let gitbranch[expand('%:p')]=GitBranch() +" let gitbranch={} +" autocmd BufRead,BufNewFile,FileReadPre * let gitbranch[expand('%:p')]=GitBranch() set statusline= -set statusline+=%#PmenuSel# -set statusline+=%{gitbranch[expand('%:p')]} +" set statusline+=%#PmenuSel# +" set statusline+=%{gitbranch[expand('%:p')]} set statusline+=%#PmenuSbar# -set statusline+=\ %F +set statusline+=%F set statusline+=%m\ set statusline+=%= set statusline+=%#CursorColumn# diff --git a/dot_zshrc b/dot_zshrc @@ -17,9 +17,13 @@ zmodload zsh/complist compinit #_comp_options+=(globdots) +# Auto complete case insensitive +zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' + # Set up vim style keys bindkey -v export KEYTIMEOUT=1 +bindkey "^?" backward-delete-char # Also set vim keys to navigate the menus when double pressing tab bindkey -M menuselect 'h' vi-backward-char