summaryrefslogtreecommitdiff
path: root/.vimrc
diff options
context:
space:
mode:
authorjohannst <stoelp@eit.uni-kl.de>2016-10-20 18:42:48 +0200
committerjohannst <stoelp@eit.uni-kl.de>2016-10-20 18:42:48 +0200
commit0aaeb464ba5a55423338aa73b8c7a8c68d393331 (patch)
tree3198d91ea2e7895154c524a43e4f2af4d7541c0e /.vimrc
parent2fe1244636d56eae08a14326b173ff03d54b3c00 (diff)
downloaddotfiles-0aaeb464ba5a55423338aa73b8c7a8c68d393331.tar.gz
dotfiles-0aaeb464ba5a55423338aa73b8c7a8c68d393331.zip
vimrc added autocommand groups with clear; changed coloring in vim colorscheme
Diffstat (limited to '.vimrc')
-rw-r--r--.vimrc31
1 files changed, 21 insertions, 10 deletions
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