1
0

update configuration

This commit is contained in:
valeth 2015-03-13 00:21:54 +01:00
parent ff38cdd999
commit a080c06903
54 changed files with 153 additions and 154 deletions

View File

@ -1,17 +1,21 @@
SUBMODULES = bundle/*
CO_INFO = \e[1;34m
CO_CLEAR = \e[0m
.PHONY: $(SUBMODULES)
all: $(SUBMODULES)
all: $(SUBMODULES) youcompleteme
youcompleteme: bundle/youcompleteme
@echo -e "$(CO_INFO)building submodule $@$(CO_CLEAR)"
@cd $< && \
git submodule update --init --recursive && \
bash ./install.sh --clang-completer --system-libclang
$(SUBMODULES):
$(info updating submodule $@)
@cd $@
@git pull origin master 1>/dev/null 2>/dev/null
@echo -e "$(CO_INFO)updating submodule $@$(CO_CLEAR)"
@cd $@ && \
git pull origin master
bundle/youcompleteme:
$(info updating submodule $@)
@cd $@
@git pull origin master 1>/dev/null 2>/dev/null
@git submodule update --init --recursive
@bash ./install.sh --clang-completer

View File

@ -1,24 +0,0 @@
"aug LineNumbers
"au!
"au VimEnter,WinEnter,InsertLeave * setlocal relativenumber
"au WinLeave,InsertEnter * setlocal norelativenumber
"aug END
aug CursorLineColumn
au!
au VimEnter,WinEnter,BufWinEnter * setlocal cursorline cursorcolumn
"au VimEnter,WinEnter,BufWinEnter * setlocal cursorcolumn
"au VimEnter,WinEnter,BufWinEnter * setlocal colorcolumn=80
au WinLeave * setlocal nocursorline nocursorcolumn colorcolumn=0
aug END
aug FastEscape
au!
au InsertEnter * set timeoutlen=0
au InsertLeave * set timeoutlen=1000
aug END
aug ReadonlyFiles
au BufNewFile,BufRead /var/log/* set readonly
au BufNewFile,BufRead /var/log/* set nomodifiable
aug END

5
config/bundle/crypto.vim Normal file
View File

@ -0,0 +1,5 @@
if v:version >= 704
set cryptmethod=blowfish
au BufReadPost * if &key != "" | set noswapfile nowritebackup viminfo= nobackup noshelltemp history=0 secure | endif
endif

View File

@ -1,3 +1,7 @@
let g:gundo_width = 60
let g:gundo_preview_height = 30
let g:gundo_right = 1
nnoremap <silent> <F11> :GundoToggle<CR>
inoremap <silent> <F11> <C-O>:GundoToggle<CR>
vnoremap <silent> <F11> <ESC>:GundoToggle<CR>

View File

@ -1,14 +1,18 @@
set grepprg=grep\ -nH\ $*
let g:tex_flavor = "latex"
let g:tex_fold_enabled = 1
let g:Imap_UsePlaceHolders = 0
let g:Tex_ViewRule_dvi = ""
let g:Tex_ViewRule_ps = ""
let g:Tex_ViewRule_pdf = ""
let g:Tex_ViewRuleComplete_dvi = "pgrep okular.*$* || xdg-open &"
let g:Tex_ViewRuleComplete_ps = ""
let g:Tex_ViewRuleComplete_pdf = "pgrep okular.*$* || xdg-open &"
let g:Tex_DefaultTargetFormat = "pdf"
nnoremap <SID> <Plug>Tex_Help
inoremap <SID> <Plug>Tex_Help
nnoremap <SID> <Plug>IMAP_JumpForward
vnoremap <SID> <Plug>IMAP_JumpForward
"noremap <buffer> <F5> :w<CR> :!pdflatex -shell-escape "%" && { pgrep ".*%:p || xdg-open %:p:r.pdf }<CR>

View File

@ -1,2 +1,6 @@
colorscheme molokai
set background=dark
"let g:molokai_original = 1
"let g:rehash256 = 1

View File

@ -1,3 +1,5 @@
au bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
noremap <silent> <F3> :NERDTreeToggle<CR>
inoremap <silent> <F3> <C-O>:NERDTreeToggle<CR>
vnoremap <silent> <F3> <ESC>:NERDTreeToggle<CR>

View File

@ -1,3 +1,7 @@
set laststatus=2
set noshowmode
"set showtabline=2
"if $TERM != "linux"
"if executable("powerline")
"if executable("python3")
@ -8,4 +12,5 @@
"endif
"endif
"let g:powerline_pycmd = "py3"
let g:powerline_pycmd = "py3"
let g:powerline_pyeval = g:powerline_pycmd . "eval"

View File

@ -2,11 +2,8 @@ let g:syntastic_enable_signs = 1
let g:syntastic_check_on_open = 1
let g:syntastic_enable_highlighting = 1
let g:syntastic_auto_loc_list = 1
"let g:syntastic_c_check_header = 1
"let g:syntastic_cpp_remove_include_errors = 1
"let g:syntastic_cpp_check_header = 1
"let g:syntastic_cpp_auto_refresh_includes = 1
let g:syntastic_tex_checkers = ["false"]

View File

@ -1,3 +1,4 @@
let g:ycm_global_ycm_extra_conf = $XDG_CONFIG_HOME . "/vim/config/ycm/ycm_extra_conf.py"
let g:ycm_global_ycm_extra_conf = $XDG_CONFIG_HOME . "/vim/config/youcompleteme/ycm_extra_conf.py"
let g:ycm_autoclose_preview_window_after_completion = 1
let g:ycm_register_as_syntastic_checker = 1
let g:ycm_server_keep_logfile = 1

View File

@ -1,22 +1,22 @@
import os
import ycm_core
flags = [ '-Wall', '-Werror', '-std=c99' ]
# Set this to the absolute path to the folder (NOT the file!) containing the
# compile_commands.json file to use that instead of 'flags'. See here for
# compile_commands.json file to use that instead of "flags". See here for
# more details: http://clang.llvm.org/docs/JSONCompilationDatabase.html
#
# Most projects will NOT need to set this to anything; you can just change the
# 'flags' list of compilation flags. Notice that YCM itself uses that approach.
compilation_database_folder = ''
# "flags" list of compilation flags. Notice that YCM itself uses that approach.
compilation_database_folder = ""
flags = [ "-Wall", "-Werror", "-std=c99" ]
if os.path.exists( compilation_database_folder ):
database = ycm_core.CompilationDatabase( compilation_database_folder )
else:
database = None
SOURCE_EXTENSIONS = [ '.cpp', '.cxx', '.cc', '.c', '.m', '.mm' ]
#SOURCE_EXTENSIONS = [ ".cpp", ".cxx", ".cc", ".c", ".m", ".mm" ]
def DirectoryOfThisScript():
return os.path.dirname( os.path.abspath( __file__ ) )
@ -26,13 +26,13 @@ def MakeRelativePathsInFlagsAbsolute( flags, working_directory ):
return list( flags )
new_flags = []
make_next_absolute = False
path_flags = [ '-isystem', '-I', '-iquote', '--sysroot=' ]
path_flags = [ "-isystem", "-I", "-iquote", "--sysroot=" ]
for flag in flags:
new_flag = flag
if make_next_absolute:
make_next_absolute = False
if not flag.startswith( '/' ):
if not flag.startswith( "/" ):
new_flag = os.path.join( working_directory, flag )
for path_flag in path_flags:
@ -51,7 +51,7 @@ def MakeRelativePathsInFlagsAbsolute( flags, working_directory ):
def IsHeaderFile( filename ):
extension = os.path.splitext( filename )[ 1 ]
return extension in [ '.h', '.hxx', '.hpp', '.hh' ]
return extension in [ ".h", ".hxx", ".hpp", ".hh" ]
def GetCompilationInfoForFile( filename ):
# The compilation_commands.json file generated by CMake does not have entries
@ -87,6 +87,6 @@ def FlagsForFile( filename, **kwargs ):
final_flags = MakeRelativePathsInFlagsAbsolute( flags, relative_to )
return {
'flags': final_flags,
'do_cache': True
"flags": final_flags,
"do_cache": True
}

View File

@ -0,0 +1,7 @@
aug CursorLineColumn
au!
au VimEnter,WinEnter,BufWinEnter * setlocal cursorline cursorcolumn
"au VimEnter,WinEnter,BufWinEnter * setlocal cursorcolumn
"au VimEnter,WinEnter,BufWinEnter * setlocal colorcolumn=80
au WinLeave * setlocal nocursorline nocursorcolumn colorcolumn=0
aug END

7
config/core/escape.vim Normal file
View File

@ -0,0 +1,7 @@
imap jk <ESC>
"aug FastEscape
"au!
"au InsertEnter * set timeoutlen=0
"au InsertLeave * set timeoutlen=1000
"aug END

View File

@ -1,6 +1,11 @@
if has("folding")
set foldcolumn=0
set foldlevel=1
set foldmethod=syntax
set foldtext=MyFoldText()
let g:sh_fold_enabled=1
function! MyFoldText()
" get actual numberwidth of the current document
let nw_add = (len(line('$')) - (&numberwidth - 1))

2
config/core/help.vim Normal file
View File

@ -0,0 +1,2 @@
nnoremap <F1> <NOP>
inoremap <F1> <NOP>

2
config/core/ident.vim Normal file
View File

@ -0,0 +1,2 @@
vnoremap < <gv
vnoremap > >gv

5
config/core/invlist.vim Normal file
View File

@ -0,0 +1,5 @@
set listchars=tab:»\ ,trail:◆,extends:▹,precedes:◃,eol:↲,nbsp
nnoremap <silent> <F4> :set invlist<CR>
inoremap <silent> <F4> <C-O>:set invlist<CR>
vnoremap <silent> <F4> :<C-W>set invlist<CR>

View File

@ -0,0 +1,7 @@
let g:mapleader = ","
noremap <silent> <Leader><CR> :noh<CR>
nnoremap <Leader>vl :setlocal cursorline!<CR>
nnoremap <Leader>vc :setlocal cursorcolumn!<CR>
nnoremap <Leader>ve :setlocal colorcolumn=80<CR>
nnoremap <Leader>vn :setlocal colorcolumn=0<CR>

View File

@ -0,0 +1,7 @@
if v:version >= 704
aug LineNumbers
au!
au VimEnter,WinEnter,InsertLeave * setlocal relativenumber
au WinLeave,InsertEnter * setlocal norelativenumber
aug END
endif

3
config/core/movement.vim Normal file
View File

@ -0,0 +1,3 @@
nnoremap Y y$
nnoremap j gj
nnoremap k gk

View File

@ -1,3 +1,7 @@
"
" this only gets executed if not using the own vim installation
"
function! CheckXDGVars()
if empty($XDG_CONFIG_HOME)
let $vim_config_home=expand("$HOME/.config/vim")

12
config/core/options.vim Normal file
View File

@ -0,0 +1,12 @@
set autowrite
set shortmess=aoOtTI
set clipboard=unnamed,unnamedplus,autoselect
set autochdir
set report=0
set updatetime=1500
set switchbuf=useopen,usetab
set pumheight=10
set diffopt+=context:3
set matchtime=2

1
config/core/quit.vim Normal file
View File

@ -0,0 +1 @@
set confirm

View File

@ -0,0 +1,4 @@
aug ReadonlyFiles
au BufNewFile,BufRead /var/log/* set readonly
au BufNewFile,BufRead /var/log/* set nomodifiable
aug END

4
config/core/replace.vim Normal file
View File

@ -0,0 +1,4 @@
" local replace
nnoremap gr gd[{V%::s/<C-R>///g<left><left>
nnoremap gR gD:%s/<C-R>///g<left><left>

2
config/core/search.vim Normal file
View File

@ -0,0 +1,2 @@
set ignorecase
set smartcase

6
config/core/tabs.vim Normal file
View File

@ -0,0 +1,6 @@
nnoremap th :tabfirst<CR>
nnoremap tj :tabnext<CR>
nnoremap tk :tabprev<CR>
nnoremap tl :tablast<CR>
nnoremap tn :tabnew<CR>
nnoremap tq :tabclose<CR>

4
config/core/tabstops.vim Normal file
View File

@ -0,0 +1,4 @@
set softtabstop=4
set shiftwidth=4
set smartindent
set expandtab

7
config/core/undo.vim Normal file
View File

@ -0,0 +1,7 @@
nnoremap U :redo<CR>
nnoremap <C-R> <NOP>
if v:version >= 704
set undofile
set undolevels=1000
endif

2
config/core/wildmenu.vim Normal file
View File

@ -0,0 +1,2 @@
set wildmode=longest:full,list
set wildignore=.bak,.old,.swp,~

View File

@ -1 +0,0 @@
au BufReadPost * if &key != "" | set noswapfile nowritebackup viminfo= nobackup noshelltemp history=0 secure | endif

View File

@ -1,3 +0,0 @@
if v:version >= 704
set cryptmethod=blowfish
endif

View File

@ -1,3 +0,0 @@
let g:gundo_width = 60
let g:gundo_preview_height = 30
let g:gundo_right = 1

View File

@ -1,28 +0,0 @@
nnoremap <F1> <NOP>
inoremap <F1> <NOP>
nnoremap <silent> <F4> :set invlist<CR>
inoremap <silent> <F4> <C-O>:set invlist<CR>
vnoremap <silent> <F4> :<C-W>set invlist<CR>
nnoremap Q <NOP>
nnoremap K <NOP>
nnoremap Y y$
nnoremap j gj
nnoremap k gk
vnoremap < <gv
vnoremap > >gv
nnoremap th :tabfirst<CR>
nnoremap tj :tabnext<CR>
nnoremap tk :tabprev<CR>
nnoremap tl :tablast<CR>
nnoremap tn :tabnew<CR>
nnoremap tq :tabclose<CR>
noremap <silent> <Leader><CR> :noh<CR>
nnoremap <Leader>vl :setlocal cursorline!<CR>
nnoremap <Leader>vc :setlocal cursorcolumn!<CR>
nnoremap <Leader>ve :setlocal colorcolumn=80<CR>
nnoremap <Leader>vn :setlocal colorcolumn=0<CR>

View File

@ -1,5 +0,0 @@
nnoremap <SID> <Plug>Tex_Help
inoremap <SID> <Plug>Tex_Help
nnoremap <SID> <Plug>IMAP_JumpForward
vnoremap <SID> <Plug>IMAP_JumpForward
"noremap <buffer> <F5> :w<CR> :!pdflatex -shell-escape "%" && { pgrep ".*%:p || xdg-open %:p:r.pdf }<CR>

View File

@ -1 +0,0 @@
set grepprg=grep\ -nH\ $*

View File

@ -1 +0,0 @@
colorscheme molokai

View File

@ -1 +0,0 @@
set background=dark

View File

@ -1 +0,0 @@
au bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif

View File

@ -1,36 +0,0 @@
set listchars=tab:»\ ,trail:◆,extends:▹,precedes:◃,eol:↲,nbsp
set ignorecase
set smartcase
set confirm
set autowrite
set shortmess=aoOtTI
set clipboard=unnamed,unnamedplus,autoselect
set softtabstop=4
set shiftwidth=4
set smartindent
set expandtab
set wildmode=longest:full,list
set wildignore=.bak,.old,.swp,~
set autochdir
if v:version >= 704
set undofile
set undolevels=1000
endif
set report=0
set updatetime=1500
set switchbuf=useopen,usetab
set pumheight=10
set diffopt+=context:3
set matchtime=2
set foldcolumn=0
set foldlevel=1
set foldmethod=syntax
set nowrap
set t_Co=256

View File

@ -1,3 +0,0 @@
set laststatus=2
set noshowmode
"set showtabline=2

View File

@ -1 +0,0 @@
let g:quickrun_config = {}

View File

@ -1 +0,0 @@
"colorscheme solarized

View File

@ -1 +0,0 @@
"set background=dark

View File

@ -1,2 +0,0 @@
let g:solarized_termtrans = 1
let g:solarized_termcolors = 256

View File

@ -1 +0,0 @@
inoremap <C-@> <C-Space>

View File

@ -1,5 +0,0 @@
let g:UltiSnipsUsePythonVersion = 3
let g:UltiSnipsExpandTrigger = '<C-Space>'
let g:UltiSnipsJumpForwardTrigger = '<C-l>'
let g:UltiSnipsJumpBackwardTrigger = '<C-h>'
let g:UltiSnipsSnippetDirectories = ['UltiSnips', 'snippets']

View File

@ -1,2 +0,0 @@
let g:mapleader = ","
let g:sh_fold_enabled=1

10
vimrc
View File

@ -5,8 +5,10 @@
" "
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
runtime! config/*.vim
runtime bundle/unbundle/unbundle.vim
runtime! config/**/*.vim
"runtime bundle/unbundle/unbundle.vim
runtime bundle/pathogen/autoload/pathogen.vim
colorscheme molokai
execute pathogen#infect()
runtime! config/core/**/*.vim
runtime! config/bundle/**/*.vim