dotfiles

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

commit 4e436e79908756f5a08ac96f7a9605c0c2655483
parent d2718deb6e5c51b92112ddff2d1769952d84a5df
Author: Alex Balgavy <a.balgavy@gmail.com>
Date:   Mon,  1 Oct 2018 22:23:12 +0200

Added vimrc comments and stuff

Diffstat:
Mvim/editor.vimrc | 52+++++++++++++++++++---------------------------------
Mvim/general.vimrc | 18++++++++++++++++++
Mvim/map.vimrc | 3+++
Mvim/plugins.vimrc | 4++++
4 files changed, 44 insertions(+), 33 deletions(-)

diff --git a/vim/editor.vimrc b/vim/editor.vimrc @@ -1,9 +1,13 @@ +"====== EDITING PREFERENCES ======" " Syntax highlighting syntax on " Filetype-specific indenting filetype plugin indent on +" In general, don't want anything concealed +set conceallevel=0 + " Highlight current line set cursorline @@ -11,8 +15,8 @@ set cursorline set nowrap " Linebreak when obsessive -set lbr -set tw=500 +set linebreak +set textwidth=500 " Numbered lines set number @@ -25,53 +29,35 @@ set expandtab set smarttab " and 1 tab == 4 spaces -" also, shift by 4 spaces -set shiftwidth=4 -set softtabstop=4 -set shiftround -set copyindent +set shiftwidth=4 " when >> +set tabstop=4 " visually +set softtabstop=4 " and when editing +set shiftround " always shift by multiple of shiftwidth +set copyindent " smart indent based on file -" Auto indent +" Auto indent when starting new line set autoindent - -" Smart indent set smartindent -" Folding +" Folding on indentation set foldmethod=indent - -" Status bar -set laststatus=2 " Always show status bar -set statusline=\ %F " Full path -set statusline+=\ %m%r%h%w " Flags (modified, readonly, help, preview) -set statusline+=\ %y " File type -set statusline+=\ \ CWD:\ %r%{getcwd()}%h " Current working directory -set statusline+=%= " Left/right separator -set statusline+=\ %l/%L\ " cursor line/total lines -set statusline+=\ B%n " Buffer number -set statusline+=\ \ %{strftime(\"%H:%M\")} " time +set foldlevelstart=5 " start with up to 5 levels open +set foldnestmax=10 " unless callback-hell JS " Show matching brackets set showmatch set matchtime=2 " Searching -set ignorecase -set hlsearch -set incsearch -set smartcase - -" Set 80-char column (off by default) -" set colorcolumn=80 -highlight ColorColumn ctermbg=233 +set hlsearch " highlight matches +set incsearch " search while typing +set ignorecase " ignore case generally +set smartcase " but not if searching for capital " Backspace tweaks set backspace=indent,eol,start 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/general.vimrc b/vim/general.vimrc @@ -49,3 +49,21 @@ set t_Co=256 " Mouse tweak set mousemodel=popup + +" Status bar +set laststatus=2 " Always show status bar +set statusline=\ %F " Full path +set statusline+=\ %m%r%h%w " Flags (modified, readonly, help, preview) +set statusline+=\ %y " File type +set statusline+=\ \ CWD:\ %r%{getcwd()}%h " Current working directory +set statusline+=%= " Left/right separator +set statusline+=\ %l/%L\ " cursor line/total lines +set statusline+=\ B%n " Buffer number +set statusline+=\ \ %{strftime(\"%H:%M\")} " time + +" Set 80-char column (off by default) +" set colorcolumn=80 +highlight ColorColumn ctermbg=233 + +" How to split new windows +set splitbelow splitright diff --git a/vim/map.vimrc b/vim/map.vimrc @@ -63,3 +63,6 @@ nnoremap <leader>ml :<C-u>marks a-z<CR>:normal! ` " Map '0' to act as '^' on first press and '0' on second nnoremap <expr> <silent> 0 col('.') == match(getline('.'),'\S')+1 ? '0' : '^' + +" Highlight last inserted text +nnoremap gV `[v`] diff --git a/vim/plugins.vimrc b/vim/plugins.vimrc @@ -35,4 +35,8 @@ Plug 'tpope/vim-eunuch' " Delete hidden unused buffers Plug 'arithran/vim-delete-hidden-buffers' +" Markdown in vim (better than built-in) +Plug 'godlygeek/tabular' +Plug 'plasticboy/vim-markdown' + call plug#end()