dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

commit c0b7bba75f383f063657b3805db0225bfb208ff6
parent a2727fd66f430e6770682d952b726e35523372e7
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Sun, 19 Aug 2018 20:11:06 +0200

Vim config split into files, added plugins

Diffstat:
Mvim-config/editor.vimrc | 3+++
Mvim-config/general.vimrc | 2+-
Mvim-config/init.vimrc | 1+
Mvim-config/map.vimrc | 18+++++++++++++++++-
Avim-config/plugins.vimrc | 5+++++
5 files changed, 27 insertions(+), 2 deletions(-)

diff --git a/vim-config/editor.vimrc b/vim-config/editor.vimrc @@ -61,3 +61,6 @@ set whichwrap+=<,>,h,l " How to split new windows set splitbelow splitright +" Better completion +set complete=.,w,b,u,t +set completeopt=longest,menuone,preview diff --git a/vim-config/general.vimrc b/vim-config/general.vimrc @@ -1,6 +1,6 @@ "====== GENERAL ======" " Update file when changed from the outside -set autoread +" set autoread " For editing binaries set binary diff --git a/vim-config/init.vimrc b/vim-config/init.vimrc @@ -1,3 +1,4 @@ +source $HOME/.config/vim-config/plugins.vimrc source $HOME/.config/vim-config/general.vimrc source $HOME/.config/vim-config/editor.vimrc source $HOME/.config/vim-config/commands.vimrc diff --git a/vim-config/map.vimrc b/vim-config/map.vimrc @@ -3,6 +3,9 @@ let mapleader="," " Set the mapleader to be , " So I don't have to mash shift all the time nnoremap ; : +" NERDTree +nnoremap <leader>f :NERDTreeToggle<cr> + " Fat finger fixes cnoreabbrev W! w! cnoreabbrev Q! q! @@ -14,11 +17,15 @@ cnoreabbrev WQ wq cnoreabbrev W w cnoreabbrev Q q cnoreabbrev Qall qall +cnoreabbrev E Explore map q: <Nop> -" Custom mappings +" Normal mode shortcuts nnoremap <leader>dif :Diff<cr> nnoremap <leader>/ :noh<cr> +nnoremap <leader>b :ls<cr> + +" Tab completion inoremap <expr> <tab> InsertTabWrapper() inoremap <s-tab> <c-n> @@ -32,3 +39,12 @@ vnoremap K :m '<-2<cr>gv=gv " stfu and write the file cmap w!! w !sudo tee > /dev/null % + +" and don't break my colours (U for 'unfuck my screen please') +nnoremap U :syntax sync fromstart<cr>:redraw!<cr> + +" Panic button rot13 +nnoremap <leader>qq mzggg?G`z + +" 'zoom to head level' +nnoremap zh mzzt10<c-u>`z diff --git a/vim-config/plugins.vimrc b/vim-config/plugins.vimrc @@ -0,0 +1,5 @@ +call plug#begin('~/.vim/plugged') +Plug 'scrooloose/nerdtree' +Plug 'mattn/emmet-vim' +Plug 'leafgarland/typescript-vim' +call plug#end()