Author information + buffer switching + abbreviations + hidden characters + no auto re select when indenting

This commit is contained in:
madmaurice 2015-11-26 17:59:40 +01:00
parent cd9c5d54af
commit 6c080f70a1

View file

@ -1,3 +1,7 @@
" Vim configuration
" Author: Mad <madmaurice@zom.bi>
" Last Revision: Thursday, 26. November 2015 17:51
set nocompatible set nocompatible
filetype off filetype off
@ -77,13 +81,19 @@ set backup
set writebackup set writebackup
set backupdir=~/.vim/backup// set backupdir=~/.vim/backup//
set directory=~/.vim/backup// set directory=~/.vim/backup//
set undofile
set undodir=$HOME/.vim/undo
set undolevels=1000
set undoreload=10000
" we dont need to show the mode " we dont need to show the mode
set noshowmode set noshowmode
set listchars=eol:↲,tab:▶▹,nbsp:␣,extends:…,trail:•
" }}} " }}}
" --- Abbreviations {{{ " --- Abbreviations {{{
iab _DATE <C-R>=strftime("%A, %d. %B %Y %H:%M")<CR> iab _date <C-R>=strftime("%A, %d. %B %Y %H:%M")<CR>
iab _zmail madmaurice@zom.bi
iab _tumail valentin.gehrke@mailbox.tu-dresden.de
" }}} " }}}
" --- Autoload when saving vimrc {{{ " --- Autoload when saving vimrc {{{
@ -174,8 +184,8 @@ nnoremap <silent> <leader>t :g/TODO/<cr>
" 0 should find first non blank " 0 should find first non blank
nmap 0 ^ nmap 0 ^
" Easy buffer switching " Easy buffer switching
nnoremap <silent> H :bnext<cr> nnoremap <silent> M :bnext<cr>
nnoremap <silent> L :bprev<cr> nnoremap <silent> N :bprev<cr>
" Moving through windows " Moving through windows
nnoremap <silent> <C-l> <C-w>l nnoremap <silent> <C-l> <C-w>l
nnoremap <silent> <C-h> <C-w>h nnoremap <silent> <C-h> <C-w>h
@ -190,9 +200,9 @@ nnoremap <F1> <nop>
vnoremap <F1> <nop> vnoremap <F1> <nop>
" -- Make Y behave correct " -- Make Y behave correct
map Y y$ map Y y$
" -- Easy indenting in visual
vnoremap > >gv " Showing and hiding special characters
vnoremap < <gv nnoremap <silent> <leader>l :set nolist!<cr>
" Automatic running " Automatic running
autocmd filetype python nnoremap <F5> :w<cr>:!python %<cr> autocmd filetype python nnoremap <F5> :w<cr>:!python %<cr>
@ -236,8 +246,11 @@ let g:SuperTabNoCompleteAfter = ['^',',','\s']
" --- NERDTree config {{{ " --- NERDTree config {{{
nmap <silent> <leader>e :NERDTreeToggle<CR> nmap <silent> <leader>e :NERDTreeToggle<CR>
" Open NERDTree when vim is started without files to open
autocmd StdinReadPre * let s:std_in=1 autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif autocmd VimEnter * if argc() == 0 && !exists("s:std_in") | NERDTree | endif
" Auto refresh NERDTree when focus
autocmd WinEnter * if exists('b:NERDTree') | execute 'normal R' | endif
let NERDTreeWinSize = 30 let NERDTreeWinSize = 30
let NERDChristmasTree = 0 let NERDChristmasTree = 0
let NERDTreeChDirMode = 2 let NERDTreeChDirMode = 2
@ -253,8 +266,8 @@ let g:EasyMotion_do_mapping = 0 " Disable default mappings
map / <Plug>(easymotion-sn) map / <Plug>(easymotion-sn)
omap / <Plug>(easymotion-tn) omap / <Plug>(easymotion-tn)
map ? <Plug>(easymotion-bd-jk) map ? <Plug>(easymotion-bd-jk)
map n <Plug>(easymotion-next) "map n <Plug>(easymotion-next)
map N <Plug>(easymotion-prev) "map N <Plug>(easymotion-prev)
" }}} " }}}
" --- Auto pairs config {{{ " --- Auto pairs config {{{