Compare commits
No commits in common. "managenow" and "main" have entirely different histories.
71
.vimrc
71
.vimrc
|
|
@ -6,7 +6,7 @@
|
||||||
"set nocompatible " use vim defaults
|
"set nocompatible " use vim defaults
|
||||||
syntax on " use syntax highlighting
|
syntax on " use syntax highlighting
|
||||||
set background=dark " when using black background terminal
|
set background=dark " when using black background terminal
|
||||||
" colorscheme ron " for bash in windows this fixes my colors in vim inside tmux
|
colorscheme ron " for bash in windows this fixes my colors in vim inside tmux
|
||||||
|
|
||||||
set nomodeline " workaround to close a vuln
|
set nomodeline " workaround to close a vuln
|
||||||
|
|
||||||
|
|
@ -63,8 +63,14 @@ filetype on
|
||||||
let mapleader=" "
|
let mapleader=" "
|
||||||
let g:mapleader=" "
|
let g:mapleader=" "
|
||||||
|
|
||||||
|
" settings for vim 7
|
||||||
|
if version >= 700
|
||||||
|
set spellfile=~/.vimspell.de.add,~/.vimspell.en.add
|
||||||
|
" setlocal spell spelllang=de " enable spell checker
|
||||||
|
endif
|
||||||
|
|
||||||
hi LineTooLong cterm=bold ctermbg=red guibg=LightYellow
|
hi LineTooLong cterm=bold ctermbg=red guibg=LightYellow
|
||||||
match LineTooLong /\%>160v.\+/
|
match LineTooLong /\%>80v.\+/
|
||||||
|
|
||||||
"useful mappings for managing tabs
|
"useful mappings for managing tabs
|
||||||
map <leader>tn :tabnew<cr>
|
map <leader>tn :tabnew<cr>
|
||||||
|
|
@ -85,7 +91,12 @@ endfun
|
||||||
" grep will sometimes skip displaying the file name
|
" grep will sometimes skip displaying the file name
|
||||||
set grepprg=grep\ -nH\ $*
|
set grepprg=grep\ -nH\ $*
|
||||||
|
|
||||||
let g:Tex_Folding=0 "I don't like folding.
|
" Starting with Vim 7, the filetype of empty .tex files defaults to
|
||||||
|
" 'plaintex' instead of 'tex', which results in vim-latex not being loaded.
|
||||||
|
" The following changes the default filetype back to 'tex':
|
||||||
|
let g:tex_flavor='latex'
|
||||||
|
|
||||||
|
"let g:Tex_Folding=0 "I don't like folding.
|
||||||
set iskeyword+=:
|
set iskeyword+=:
|
||||||
|
|
||||||
" Press Space to turn off highlighting and clear any message already displayed.
|
" Press Space to turn off highlighting and clear any message already displayed.
|
||||||
|
|
@ -102,6 +113,9 @@ function! Incr()
|
||||||
endfunction
|
endfunction
|
||||||
vnoremap <C-a> :call Incr()<CR>
|
vnoremap <C-a> :call Incr()<CR>
|
||||||
|
|
||||||
|
" Prss CTRL + _ (CTRL + SHIFT + -) to close a html tag
|
||||||
|
if filereadable(glob('~/.vim/scripts/closetag.vim')) | source ~/.vim/scripts/closetag.vim | endif
|
||||||
|
|
||||||
highlight ExtraWhitespace ctermbg=red guibg=red
|
highlight ExtraWhitespace ctermbg=red guibg=red
|
||||||
match ExtraWhitespace /\s\+$\| \+\ze\t/
|
match ExtraWhitespace /\s\+$\| \+\ze\t/
|
||||||
|
|
||||||
|
|
@ -111,11 +125,23 @@ nnoremap <F2> :<C-U>%retab!<CR>:set list<CR>:%s/^\(\t\+\) */\1/<CR>
|
||||||
nnoremap <F5> "=strftime("%c")<CR>P
|
nnoremap <F5> "=strftime("%c")<CR>P
|
||||||
inoremap <F5> <C-R>=strftime("%c")<CR>
|
inoremap <F5> <C-R>=strftime("%c")<CR>
|
||||||
|
|
||||||
" YAML and Ansible and so on
|
" a few autocommands for when silly people send stupid file formats
|
||||||
augroup ansible_vim_fthosts
|
" Read-only .doc through antiword
|
||||||
autocmd!
|
autocmd BufReadPre *.doc silent set ro
|
||||||
autocmd BufNewFile,BufRead hosts setfiletype yaml.ansible
|
autocmd BufReadPost *.doc silent %!antiword "%"
|
||||||
augroup END
|
|
||||||
|
" Read-only odt/odp through odt2txt
|
||||||
|
autocmd BufReadPre *.odt,*.odp silent set ro
|
||||||
|
autocmd BufReadPost *.odt,*.odp silent %!odt2txt "%"
|
||||||
|
|
||||||
|
" Read-only pdf through pdftotext
|
||||||
|
autocmd BufReadPre *.pdf silent set ro
|
||||||
|
autocmd BufReadPost *.pdf silent %!pdftotext -nopgbrk -layout -q -eol unix "%" -
|
||||||
|
"| fmt -w250
|
||||||
|
|
||||||
|
" Read-only rtf through unrtf
|
||||||
|
autocmd BufReadPre *.rtf silent set ro
|
||||||
|
autocmd BufReadPost *.rtf silent %!unrtf --text
|
||||||
|
|
||||||
" as long as vim isn't in diff-mode check the code at opening and closing
|
" as long as vim isn't in diff-mode check the code at opening and closing
|
||||||
" also: special vimdiff-settings
|
" also: special vimdiff-settings
|
||||||
|
|
@ -131,14 +157,6 @@ if ! &diff
|
||||||
nnoremap <leader>l <C-L>
|
nnoremap <leader>l <C-L>
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" NerdTree Settings
|
|
||||||
nnoremap <leader>n :NERDTreeToggle<CR>
|
|
||||||
nnoremap <leader>nf :NERDTreeFocus<CR>
|
|
||||||
nnoremap <leader>nc :NERDTreeClose<CR>
|
|
||||||
|
|
||||||
" block-editing workaround for a windows-terminal-wsl situation
|
|
||||||
nnoremap <Leader>v <c-v>
|
|
||||||
|
|
||||||
"tweaking my statusline
|
"tweaking my statusline
|
||||||
function! GitBranch()
|
function! GitBranch()
|
||||||
return system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'")
|
return system("git rev-parse --abbrev-ref HEAD 2>/dev/null | tr -d '\n'")
|
||||||
|
|
@ -166,24 +184,3 @@ set statusline+=\ %p%%
|
||||||
set statusline+=\ %l:%c
|
set statusline+=\ %l:%c
|
||||||
set statusline+=\
|
set statusline+=\
|
||||||
|
|
||||||
call plug#begin('~/.vim/plugged')
|
|
||||||
|
|
||||||
" --- Your Plugin List Goes Here ---
|
|
||||||
" Example:
|
|
||||||
Plug 'tpope/vim-surround'
|
|
||||||
Plug 'preservim/nerdtree'
|
|
||||||
Plug 'pearofducks/ansible-vim'
|
|
||||||
|
|
||||||
" Automatically install plugins if they are not installed
|
|
||||||
" Call plug#config_commit() is the modern way to replace auto_install, save_state, etc.
|
|
||||||
" call plug#config_commit()
|
|
||||||
|
|
||||||
" Optional: For automatic plugin updates on startup if you want
|
|
||||||
" autocmd VimEnter *
|
|
||||||
" \ PlugUpgrade |
|
|
||||||
" \ execute PlugInstall |
|
|
||||||
" \ PlugClean
|
|
||||||
|
|
||||||
" Initialize plugin system, then load plugins
|
|
||||||
call plug#end()
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user