From 0aaeb464ba5a55423338aa73b8c7a8c68d393331 Mon Sep 17 00:00:00 2001 From: johannst Date: Thu, 20 Oct 2016 18:42:48 +0200 Subject: vimrc added autocommand groups with clear; changed coloring in vim colorscheme --- .vim/colors/buddy.vim | 5 ++++- .vimrc | 31 +++++++++++++++++++++---------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/.vim/colors/buddy.vim b/.vim/colors/buddy.vim index b402d07..d1e2839 100755 --- a/.vim/colors/buddy.vim +++ b/.vim/colors/buddy.vim @@ -68,6 +68,10 @@ hi DiffText cterm=NONE ctermfg=10 ctermbg=88 hi DiffAdd cterm=NONE ctermfg=10 ctermbg=17 hi DiffDelete cterm=NONE ctermfg=10 ctermbg=17 + +hi PMenu ctermfg=NONE ctermbg=235 cterm=NONE +hi PMenuSel ctermfg=255 ctermbg=208 cterm=NONE + hi Debug guifg=#f0ffe2 guibg=NONE guisp=NONE gui=NONE ctermfg=194 ctermbg=NONE cterm=NONE hi PMenuSbar guifg=NONE guibg=#000000 guisp=#000000 gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE hi Identifier guifg=#f3cf64 guibg=NONE guisp=NONE gui=NONE ctermfg=221 ctermbg=NONE cterm=NONE @@ -79,7 +83,6 @@ hi Special guifg=#f3cf64 guibg=NONE guisp=NONE gui=NONE ctermfg=221 ctermbg=NONE hi LineNr guifg=#4d4d4d guibg=#1d1d1d guisp=#1d1d1d gui=NONE ctermfg=239 ctermbg=234 cterm=NONE hi StatusLine ctermbg=38 ctermfg=0 cterm=NONE term=NONE gui=NONE hi Label guifg=#f3cf64 guibg=NONE guisp=NONE gui=NONE ctermfg=221 ctermbg=NONE cterm=NONE -hi PMenuSel guifg=#1a1a1a guibg=#e6cd83 guisp=#e6cd83 gui=NONE ctermfg=234 ctermbg=180 cterm=NONE hi Delimiter guifg=#f0ffe2 guibg=NONE guisp=NONE gui=NONE ctermfg=194 ctermbg=NONE cterm=NONE hi Statement guifg=#ffdd00 guibg=NONE guisp=NONE gui=NONE ctermfg=220 ctermbg=NONE cterm=NONE hi Comment guifg=#b3b0a3 guibg=NONE guisp=NONE gui=italic ctermfg=144 ctermbg=NONE cterm=NONE diff --git a/.vimrc b/.vimrc index 9a42a8e..c834476 100644 --- a/.vimrc +++ b/.vimrc @@ -61,8 +61,12 @@ set nocompatible " make vim less vi "}}} -"autocmd VimEnter * silent! source .vim_last_session -"autocmd QuitPre * mksession! .vim_last_session +augroup aug:AutoSaveResore + autocmd! + "autocmd VimEnter * silent! source .vim_last_session + autocmd QuitPre * mksession! .vim_last_session +augroup end + function! TriggerSCons(arg_string) let base_cmd = "scons -u " @@ -129,8 +133,12 @@ set foldmethod=marker " set fold method " Indentation settings set autoindent " copy indent from current line when starting a new line set smartindent " use smart indent if there is no indent file -autocmd BufRead,BufNewFile *.h,*.hh,*.hpp,*.c,*.cc,*.cpp set cinoptions=:1,=2,g1,h2 " switch-case/class-lable indentation -autocmd BufRead,BufNewFile * setlocal formatoptions-=cro " disable auto-comment + +augroup aug:CLangStyle + autocmd! + autocmd BufRead,BufNewFile *.h,*.hh,*.hpp,*.c,*.cc,*.cpp set cinoptions=:1,=2,g1,h2 " switch-case/class-lable indentation + autocmd BufRead,BufNewFile * setlocal formatoptions-=cro " disable auto-comment +augroup end " Invisible character settings "set list " show invisible character @@ -156,8 +164,11 @@ set noerrorbells set novisualbell " automatically open Quickfix -autocmd QuickFixCmdPost [^l]* nested botright cwindow -autocmd QuickFixCmdPost l* nested botright lwindow +augroup aug:QuickFixConfig + autocmd! + autocmd QuickFixCmdPost [^l]* nested botright cwindow + autocmd QuickFixCmdPost l* nested botright lwindow +augroup end "{{{ Keymaps @@ -245,19 +256,19 @@ autocmd QuickFixCmdPost l* nested botright lwindow "{{{ Global Highlighting " hi clear CursorLine - " augroup CLClear + " augroup aug:CLClear " autocmd! ColorScheme * hi clear CursorLine - " augroup END + " augroup end "hi LineNr ctermfg=208 " Highlight color of current line hi CursorLineNR cterm=bold ctermfg=255 ctermbg=208 "hi CursorLineNR cterm=bold ctermfg=226 - augroup CLNRSet + augroup aug:CLNRSet autocmd! ColorScheme * hi CursorLineNR cterm=bold ctermfg=255 ctermbg=208 "autocmd! ColorScheme * hi CursorLineNR cterm=bold ctermfg=226 - augroup END + augroup end " matching brackets "hi MatchParen cterm=underline ctermbg=141 ctermfg=yellow -- cgit v1.2.3