diff --git a/vim/vimrc b/vim/vimrc index 4652776..b1de209 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -8,6 +8,7 @@ set nocompatible " Be IMproved (https://goo.gl/2RiJoo) syntax on " Syntax hilighting 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 autoread " Auto-reload files changed outside Vim set autochdir " Auto-change to local file directory @@ -44,30 +45,33 @@ augroup spellcheckr " Spelling, for some files... autocmd! autocmd BufNewFile,BufRead *.md,*.rdoc,*.txt,*.wiki setlocal spell augroup END - " ============================================================================== " Status Line " ============================================================================== -set laststatus=2 -set statusline= -set statusline+=%m -set statusline+=%r -set statusline+=%h -set statusline+=%{fugitive#statusline()} -set statusline+=%#Pmenu# -set statusline+=\ %F -set statusline+=%= -set statusline+= -set statusline+=%y\ +set laststatus=2 " Enable the statusline +set statusline= " Initialize it +set statusline+=%m%1*%r%0*%h " Modified, RO, Help flags +set statusline+=%2*%{&spell?'[SPELL]':''} " Spell flag set statusline+=%#StatusLine# -set statusline+=\|%l\:%c\| -set statusline+=%#SyntasticError# -set statusline+=%{SyntasticStatuslineFlag()} +set statusline+=%{fugitive#statusline()} " Fugitive: Git branch +set statusline+=%#Pmenu# " Color change (see :hi) +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 " ============================================================================== - " Map Leader key let mapleader = "," @@ -77,12 +81,6 @@ nnoremap k gk nnoremap ^ g^ nnoremap $ g$ -" Move between splits with CTRL+h/j/k/l -nnoremap l -nnoremap k -nnoremap j -nnoremap h - " Toggle fold with space, if we're in a fold, otherwise just space nnoremap @=(foldlevel('.')?'za':"\") vnoremap zf @@ -103,12 +101,10 @@ command! -nargs=1 -complete=help H :tabnew | :set buftype=help | :h nnoremap b :ls:b " Simple mapping to dotfiles directory -nnoremap df :tabnew ~/.dotfiles/ - +nnoremap f :tabnew ~/.dotfiles/ " ============================================================================== " Plugins " ============================================================================== - if filereadable(expand("~/.vimrc-plugins")) source ~/.vimrc-plugins endif diff --git a/vim/vimrc-plugins b/vim/vimrc-plugins index 9fe877b..4c273f4 100644 --- a/vim/vimrc-plugins +++ b/vim/vimrc-plugins @@ -36,7 +36,6 @@ call plug#end() " ============================================================================== " Colorscheme - minimalist configuration -set t_Co=256 colorscheme minimalist " Syntastic configs @@ -48,7 +47,7 @@ let g:syntastic_check_on_wq = 1 let g:syntastic_sh_checkers = [ 'shellcheck', 'sh' ] " 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 nnoremap tj :call NewJournal() function! NewJournal()