1
0

reorganize config files

This commit is contained in:
Patrick Auernig 2017-04-21 16:25:59 +02:00
parent f69e52110e
commit fa61a22403
6 changed files with 114 additions and 223 deletions

View File

@ -1,32 +0,0 @@
"augroup LineReturn
" au!
" au BufReadPost *
" \ if line("'\"") > 0 && line("'\"") <= line("$") |
" \ execute 'normal! g`"zvzz' |
" \ endif
"augroup END
augroup ToggleLineNumbers
au!
au VimEnter,WinEnter,InsertLeave * setlocal relativenumber
au WinLeave,InsertEnter * setlocal norelativenumber
augroup END
augroup CursorHighlight
au!
au VimEnter,WinEnter,BufWinEnter * setlocal cursorline
au WinLeave * setlocal nocursorline
"au VimEnter,WinEnter,BufWinEnter * setlocal cursorcolumn
"au WinLeave * setlocal nocursorcolumn
au VimEnter,WinEnter,BufWinEnter * setlocal colorcolumn=+3
au WinLeave * setlocal colorcolumn=0
augroup END
" save automatically
autocmd FocusLost * :silent! wa
" keep splits equal on terminal resize
autocmd VimResized * :wincmd =
" remove trailing whitespace
" autocmd BufWritePre * %s/\s\+$//e

View File

@ -1,13 +0,0 @@
let g:vim_config_home = split(&rtp, ',', 0)[0]
if exists('$XDG_CACHE_HOME')
let g:vim_cache_home = expand('$XDG_CACHE_HOME/') . v:progname
else
let g:vim_cache_home = expand('$HOME/.local/cache/') . v:progname
endif
if exists('$XDG_DATA_HOME')
let g:vim_data_home = expand('$XDG_DATA_HOME/') . v:progname
else
let g:vim_data_home = expand('$HOME/.local/share/') . v:progname
endif

View File

@ -3,10 +3,80 @@
" Source: https://gitlab.com/valeth/vim-config
" Mirror: https://github.com/valeth/vim-config
runtime! dirs.vim
runtime! settings.vim
let g:vim_config_home = split(&rtp, ',')[0]
let g:vim_data_home = &undodir[0:-6]
set autowriteall
set backupdir-=.
set breakindent
set breakindentopt=sbr
set clipboard+=unnamed,unnamedplus
set completeopt=longest,menuone,preview
set confirm
set foldcolumn=1
set foldlevel=99
set foldmethod=syntax
set foldtext=myfold#text()
set gdefault
set grepprg=grep\ -nH\ $*
set hidden
set ignorecase
set listchars=tab:»\ ,trail:◆,extends:,precedes:,eol:↲,nbsp
set matchtime=3
set noshowmode
set noswapfile
set notimeout
set nowrap
set number
set ruler
set scrolloff=3
set showmatch
set showbreak=
set shortmess=aoOtTI
set sidescrolloff=5
set smartcase
set smartindent
set splitbelow
set splitright
set synmaxcol=300
set timeoutlen=50
set ttimeout
set undofile
set virtualedit+=block
set visualbell t_vb=
set wildignore+=.git
set wildignore+=*.bak,*.old,*.swp,*~
set wildignore+=*.o,*.hi
set wildignore+=*.pyc,*.class
set wildignore+=*.pdf,*.aux
set wildignore+=*.png,*.jpg
set wildmode=list:longest,full
let $NVIM_TUI_ENABLE_CURSOR_SHAPE=1
runtime! plugins.vim
runtime! keys.vim
runtime! autocmds.vim
augroup ToggleLineNumbers
au!
au VimEnter,WinEnter,InsertLeave * setlocal relativenumber
au WinLeave,InsertEnter * setlocal norelativenumber
augroup END
augroup CursorHighlight
au!
au VimEnter,WinEnter,BufWinEnter * setlocal cursorline
au WinLeave * setlocal nocursorline
au VimEnter,WinEnter,BufWinEnter * setlocal colorcolumn=+3
au WinLeave * setlocal colorcolumn=0
augroup END
" save automatically
autocmd FocusLost * :silent! wa
" keep splits equal on terminal resize
autocmd VimResized * :wincmd =
colorscheme seoul256
call matchadd('ColorColumn', '\%81v', 100)

View File

@ -16,7 +16,6 @@ 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>
noremap <silent><Leader>nt :NERDTreeToggle<CR>
vnoremap <silent><Leader>nt <ESC>:NERDTreeToggle<CR>
nnoremap <Leader>syn :SyntasticToggleMode<CR>

View File

@ -2,164 +2,77 @@ call plug#begin(g:vim_data_home . '/plugins')
" [Misc]
Plug 'Shougo/vimproc.vim', { 'do': 'make' }
Plug 'editorconfig/editorconfig-vim'
Plug 'tpope/vim-commentary'
Plug 'sheerun/vim-polyglot'
" Plug 'cohama/lexima.vim'
Plug 'ctrlpvim/ctrlp.vim'
Plug 'Konfekt/FastFold'
Plug 'majutsushi/tagbar'
" [UI]
Plug 'bling/vim-airline'
let g:airline#extensions#tabline#enabled = 1
let g:airline_theme = 'dark'
let g:airline_powerline_fonts = 1
"Plug 'mtth/scratch.vim', { 'on': 'Scratch' }
"let g:scratch_persistence_file = g:vim_data_home . "/scratch.vim"
"Plug 'vim-scripts/gnupg'
Plug 'editorconfig/editorconfig-vim'
Plug 'tpope/vim-unimpaired'
Plug 'tpope/vim-surround'
Plug 'tpope/vim-commentary'
Plug 'vim-scripts/Tail-Bundle'
Plug 'Yggdroot/indentLine'
Plug 'Yggdroot/indentLine', { 'for': 'python' }
let g:indentLine_char = '┆'
" [Syntastic]
Plug 'scrooloose/syntastic'
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_auto_loc_list = 1
let g:syntastic_loc_list_height = 5
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"]
let g:syntastic_error_symbol = '☓'
let g:syntastic_warning_symbol = '⚠'
" [Autocomplete]
let g:deoplete#enable_at_startup = 1
Plug 'Shougo/deoplete.nvim', { 'do': ':UpdateRemotePlugins' }
Plug 'Shougo/neco-syntax'
Plug 'Shougo/context_filetype.vim'
Plug 'Shougo/neoinclude.vim', { 'for': ['c', 'cpp'] }
Plug 'Rip-Rip/clang_complete', { 'for': ['c', 'cpp'] }
Plug 'zchee/deoplete-jedi', { 'for': 'python' }
Plug 'racer-rust/vim-racer', { 'for': 'rust' }
Plug 'eagletmt/neco-ghc', { 'for': 'haskell' }
Plug 'steelsojka/deoplete-flow', { 'for': 'javascript' }
" [Version Control]
Plug 'tpope/vim-fugitive'
"Plug 'airblade/vim-gitgutter'
" [Navigation]
Plug 'kien/ctrlp.vim'
Plug 'Konfekt/FastFold'
Plug 'majutsushi/tagbar'
Plug 'christoomey/vim-tmux-navigator'
let g:tmux_navigator_no_mappings = 1
Plug 'scrooloose/nerdtree', { 'on': 'NERDTreeToggle' }
Plug 'Xuyuanp/nerdtree-git-plugin', { 'on': 'NERDTreeToggle' }
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
autocmd bufenter * if exists("b:NERDTree") | setlocal nonumber norelativenumber | endif
let g:NERDTreeIndicatorMapCustom = {
\ "Modified" : "~",
\ "Staged" : "+",
\ "Untracked" : "*",
\ "Renamed" : ">",
\ "Unmerged" : "=",
\ "Deleted" : "-",
\ "Dirty" : "!",
\ "Modified" : "✹",
\ "Staged" : "✚",
\ "Untracked" : "✭",
\ "Renamed" : "➜",
\ "Unmerged" : "═",
\ "Deleted" : "✖",
\ "Dirty" : "✗",
\ "Clean" : "✔︎",
\ "Ignored" : "☒",
\ "Unknown" : "?"
\ }
" [LaTeX]
Plug 'WChargin/vim-latexsuite', { 'for': ['tex', 'latex'] }
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"
" [Assistants]
"Plug 'scrooloose/syntastic'
"let g:syntastic_check_on_open = 1
"let g:syntastic_check_on_wq = 0
"let g:syntastic_auto_loc_list = 1
"let g:syntastic_loc_list_height = 5
"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"]
"let g:syntastic_error_symbol = '☓'
"let g:syntastic_warning_symbol = '⚠'
Plug 'w0rp/ale'
" [Pandoc]
" [Language Specific]
Plug 'vim-pandoc/vim-pandoc'
Plug 'vim-pandoc/vim-pandoc-syntax'
let g:pandoc#filetypes#handles = ['markdown', 'pandoc']
let g:pandoc#filetypes#pandoc_markdown = 1
let g:pandoc#spell#enabled = 0
let g:pandoc#syntax#conceal#use = 0
let g:pandoc#folding#fdc = &fdc
" let g:pandoc#filetypes#handles = ['markdown', 'pandoc']
" let g:pandoc#filetypes#pandoc_markdown = 1
" let g:pandoc#spell#enabled = 0
" Snippets
Plug 'SirVer/ultisnips'
Plug 'honza/vim-snippets'
" Syntax
"Plug 'vim-scripts/fish-syntax'
Plug 'dag/vim-fish'
Plug 'valeth/sprak.vim', { 'for': 'sprak' }
Plug 'sheerun/vim-polyglot'
Plug 'dag/vim-fish', { 'for': 'fish' }
Plug 'Matt-Deacalion/vim-systemd-syntax', { 'for': 'systemd' }
" Rust
Plug 'rust-lang/rust.vim', { 'for': 'rust' }
" JavaScript
"Plug 'dsawardekar/ember.vim' ", { 'for': 'javascript' }
" Ruby
Plug 'vim-ruby/vim-ruby', { 'for': 'ruby' }
Plug 'ngmy/vim-rubocop', { 'for': 'ruby' }
Plug 'hallison/vim-rdoc', { 'for': 'ruby' }
Plug 'fishbullet/deoplete-ruby', { 'for': 'ruby' }
"Plug 'tpope/vim-bundler', { 'for': 'ruby' }
"Plug 'nyangry/rsense.vim', { 'for': 'ruby' }
"Plug 'tpope/vim-rails', { 'for': 'ruby' }
"Plug 'dsawardekar/portkey' ", { 'for': ['ruby', 'javascript'] }
" Dragvisuals
Plug 'tsaleh/vim-align'
Plug 'taku-o/vim-vis'
Plug 'clones/vim-cecutil'
Plug 'atweiden/vim-dragvisuals'
vmap <expr> <C-h> DVB_Drag('left')
vmap <expr> <C-l> DVB_Drag('right')
vmap <expr> <C-j> DVB_Drag('down')
vmap <expr> <C-k> DVB_Drag('up')
vmap <expr> <C-D> DVB_Duplicate()
" [Autopairs]
Plug 'cohama/lexima.vim'
"Plug 'Raimondi/delimitMate'
" [Colorschemes]
"Plug 'tomasr/molokai'
"Plug 'NLKNguyen/papercolor-theme'
"Plug 'chriskempson/tomorrow-theme'
Plug 'junegunn/seoul256.vim'
function! ToggleColorscheme()
if g:colors_name == 'Tomorrow'
colorscheme seoul256
else
colorscheme Tomorrow
endif
AirlineRefresh
endfunction
let g:seoul256_background = 237
let g:seoul256_light_background = 254
"Plug 'arcticicestudio/nord-vim'
call plug#end()
colorscheme seoul256

View File

@ -1,46 +0,0 @@
set autochdir
set autowriteall
set backupdir-=.
set breakindent
set breakindentopt=sbr
set clipboard+=unnamed,unnamedplus
set completeopt=longest,menuone,preview
set confirm
set foldcolumn=1
set foldlevel=99
set foldmethod=syntax
set foldtext=myfold#text()
set gdefault
set grepprg=grep\ -nH\ $*
set hidden
set ignorecase
set listchars=tab:»\ ,trail:◆,extends:,precedes:,eol:↲,nbsp
set matchtime=3
set noshowmode
set noswapfile
set notimeout
set number
set ruler
set scrolloff=3
"set shell=sh " because vim's system function is shit
set showmatch
set showbreak=
set shortmess=aoOtTI
set sidescrolloff=5
set smartcase
set smartindent
set splitbelow
set splitright
set synmaxcol=300
set timeoutlen=50
set ttimeout
set undofile
set virtualedit+=block
set visualbell t_vb=
set wildignore+=.git
set wildignore+=*.bak,*.old,*.swp,*~
set wildignore+=*.o,*.hi
set wildignore+=*.pyc,*.class
set wildignore+=*.pdf,*.aux
set wildignore+=*.png,*.jpg
set wildmode=list:longest,full