diff --git a/README.md b/README.md index bdff68e..24508ab 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,9 @@ ![laptop-screenshot](https://i.imgur.com/UpdX90A.png) *Screenshot from my laptop config.* -This repository contains the dotfiles for my Linux -[rice](https://www.reddit.com/r/unixporn/comments/3iy3wd/stupid_question_what_is_ricing/cukxwog/) and also help to increase my workflow efficiency significantly. +This repository contains the dotfiles to increase my workflow efficiency. They +are also for my Linux +[rice](https://www.reddit.com/r/unixporn/comments/3iy3wd/stupid_question_what_is_ricing/cukxwog/). diff --git a/dotfiles/vimrc b/dotfiles/vimrc index 9db7db7..2b19b41 100644 --- a/dotfiles/vimrc +++ b/dotfiles/vimrc @@ -112,15 +112,20 @@ colorscheme wal " }}} vim-plug " " Mappings {{{ " + +" function keys {{{ " map :wa map :wqa map :qa! map :AutoSaveToggle map :LLPStartPreview nnoremap :set pastep:set nopaste +" }}} function keys " + +map o map O -" For splits. +" splits {{{ " nnoremap nnoremap nnoremap @@ -128,35 +133,59 @@ nnoremap " Maximize height/width. nnoremap _ nnoremap | +" }}} splits " +" leader mappings {{{ " let mapleader="\" +" reload file nnoremap e :e +" reload folds nnoremap ff :set foldmethod=marker zM +" toggle search highlighting nnoremap h :set hlsearch! hlsearch? +" help nnoremap he :help nnoremap vhe :vert help +" move cursor to middle of line nnoremap m :call cursor(0, len(getline('.'))/2) +" don't wrap lines nnoremap nw :set nowrap +" check if in neovim nnoremap nv :echo has('nvim') +" Plug commands nnoremap pli :PlugInstall nnoremap plc :PlugClean nnoremap plu :PlugUpdate +" don't break lines nnoremap py :set tw=200 +" replace in next x lines nnoremap r q:i.,.+s///gFsi +" replace in line nnoremap rl q:i.s///g +" reload vim config nnoremap rv :source $MYVIMRC +" replace in entire file nnoremap R q:i%s///g2F/i +" set syntax to shell (for dotfiles) nnoremap s :set syn=sh +" format current line nnoremap w Vgq +" format this and next line nnoremap ww Vjgq +" toggle fold nnoremap z za +" copy next thing to system clipboard nnoremap y "+ + +" }}} leader mappings " + " }}} Mappings " " Local Mappings {{{ " let maplocalleader="-" autocmd Filetype c inoremap s struct pixel +" tex {{{ " autocmd Filetype tex inoremap D \Delta autocmd Filetype tex inoremap e \exists autocmd Filetype tex inoremap fa \forall @@ -175,4 +204,6 @@ autocmd Filetype tex inoremap w \wedge autocmd Filetype tex inoremap x $x$-axis autocmd Filetype tex inoremap y $y$-axis autocmd Filetype tex inoremap Z \mathbb{Z} +" }}} tex " + " }}} Local Mappings "