Update Vim configs

This commit is contained in:
Bill Niblock 2017-05-22 23:57:51 -04:00
parent 632daf66a9
commit 4d55222f52
2 changed files with 22 additions and 27 deletions

View file

@ -8,6 +8,7 @@
set nocompatible " Be IMproved (https://goo.gl/2RiJoo) set nocompatible " Be IMproved (https://goo.gl/2RiJoo)
syntax on " Syntax hilighting syntax on " Syntax hilighting
filetype plugin indent on " Recognize filetype, indent, plugin files filetype plugin indent on " Recognize filetype, indent, plugin files
set t_Co=256 " Set number of colors (256)
set encoding=utf-8 " Character encoding set encoding=utf-8 " Character encoding
set autoread " Auto-reload files changed outside Vim set autoread " Auto-reload files changed outside Vim
set autochdir " Auto-change to local file directory set autochdir " Auto-change to local file directory
@ -44,30 +45,33 @@ augroup spellcheckr " Spelling, for some files...
autocmd! autocmd!
autocmd BufNewFile,BufRead *.md,*.rdoc,*.txt,*.wiki setlocal spell autocmd BufNewFile,BufRead *.md,*.rdoc,*.txt,*.wiki setlocal spell
augroup END augroup END
" ============================================================================== " ==============================================================================
" Status Line " Status Line
" ============================================================================== " ==============================================================================
set laststatus=2 set laststatus=2 " Enable the statusline
set statusline= set statusline= " Initialize it
set statusline+=%m set statusline+=%m%1*%r%0*%h " Modified, RO, Help flags
set statusline+=%r set statusline+=%2*%{&spell?'[SPELL]':''} " Spell flag
set statusline+=%h
set statusline+=%{fugitive#statusline()}
set statusline+=%#Pmenu#
set statusline+=\ %F
set statusline+=%=
set statusline+=
set statusline+=%y\
set statusline+=%#StatusLine# set statusline+=%#StatusLine#
set statusline+=\|%l\:%c\| set statusline+=%{fugitive#statusline()} " Fugitive: Git branch
set statusline+=%#SyntasticError# set statusline+=%#Pmenu# " Color change (see :hi)
set statusline+=%{SyntasticStatuslineFlag()} set statusline+=\ %F " Full-path to current buffer
set statusline+=%= " Switch to right-side
set statusline+=%y\ " Filetype
set statusline+=%#StatusLine# " Color change (see :hi)
set statusline+=\|%4l\:%2c\| " Line and column
set statusline+=%#SyntasticError# " Color change (see :hi_
set statusline+=%{SyntasticStatuslineFlag()} " Syntastic: Warnings/Errors
augroup user_colors
autocmd!
autocmd ColorScheme *
\ hi User1 term=bold cterm=bold ctermfg=167 ctermbg=239 |
\ hi User2 term=bold cterm=bold ctermfg=111 ctermbg=239
augroup END
" ============================================================================== " ==============================================================================
" Mappings " Mappings
" ============================================================================== " ==============================================================================
" Map Leader key " Map Leader key
let mapleader = "," let mapleader = ","
@ -77,12 +81,6 @@ nnoremap <silent> k gk
nnoremap <silent> ^ g^ nnoremap <silent> ^ g^
nnoremap <silent> $ g$ nnoremap <silent> $ g$
" Move between splits with CTRL+h/j/k/l
nnoremap <silent> <C-l> <C-w>l
nnoremap <silent> <C-k> <C-w>k
nnoremap <silent> <C-j> <C-w>j
nnoremap <silent> <C-h> <C-w>h
" Toggle fold with space, if we're in a fold, otherwise just space " Toggle fold with space, if we're in a fold, otherwise just space
nnoremap <silent> <Space> @=(foldlevel('.')?'za':"\<Space>")<CR> nnoremap <silent> <Space> @=(foldlevel('.')?'za':"\<Space>")<CR>
vnoremap <Space> zf vnoremap <Space> zf
@ -103,12 +101,10 @@ command! -nargs=1 -complete=help H :tabnew | :set buftype=help | :h <args>
nnoremap <leader>b :ls<CR>:b<space> nnoremap <leader>b :ls<CR>:b<space>
" Simple mapping to dotfiles directory " Simple mapping to dotfiles directory
nnoremap <silent> <leader>df :tabnew ~/.dotfiles/<CR> nnoremap <silent> <leader>f :tabnew ~/.dotfiles/<CR>
" ============================================================================== " ==============================================================================
" Plugins " Plugins
" ============================================================================== " ==============================================================================
if filereadable(expand("~/.vimrc-plugins")) if filereadable(expand("~/.vimrc-plugins"))
source ~/.vimrc-plugins source ~/.vimrc-plugins
endif endif

View file

@ -36,7 +36,6 @@ call plug#end()
" ============================================================================== " ==============================================================================
" Colorscheme - minimalist configuration " Colorscheme - minimalist configuration
set t_Co=256
colorscheme minimalist colorscheme minimalist
" Syntastic configs " Syntastic configs
@ -48,7 +47,7 @@ let g:syntastic_check_on_wq = 1
let g:syntastic_sh_checkers = [ 'shellcheck', 'sh' ] let g:syntastic_sh_checkers = [ 'shellcheck', 'sh' ]
" Vimwiki Configs " Vimwiki Configs
let g:vimwiki_list = [{'path': '~/vimwiki/', 'auto_tags': 1}] let g:vimwiki_list = [{'path': '~/Workbench/vimwiki/', 'auto_tags': 1}]
"" Insert my journal template, and the current date "" Insert my journal template, and the current date
nnoremap <silent><leader>tj :call NewJournal()<CR> nnoremap <silent><leader>tj :call NewJournal()<CR>
function! NewJournal() function! NewJournal()