Author information + buffer switching + abbreviations + hidden characters + no auto re select when indenting
This commit is contained in:
parent
cd9c5d54af
commit
6c080f70a1
1 changed files with 22 additions and 9 deletions
31
vim/.vimrc
31
vim/.vimrc
|
@ -1,3 +1,7 @@
|
|||
" Vim configuration
|
||||
" Author: Mad <madmaurice@zom.bi>
|
||||
" Last Revision: Thursday, 26. November 2015 17:51
|
||||
|
||||
set nocompatible
|
||||
filetype off
|
||||
|
||||
|
@ -77,13 +81,19 @@ set backup
|
|||
set writebackup
|
||||
set backupdir=~/.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
|
||||
set noshowmode
|
||||
|
||||
set listchars=eol:↲,tab:▶▹,nbsp:␣,extends:…,trail:•
|
||||
" }}}
|
||||
|
||||
" --- 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 {{{
|
||||
|
@ -174,8 +184,8 @@ nnoremap <silent> <leader>t :g/TODO/<cr>
|
|||
" 0 should find first non blank
|
||||
nmap 0 ^
|
||||
" Easy buffer switching
|
||||
nnoremap <silent> H :bnext<cr>
|
||||
nnoremap <silent> L :bprev<cr>
|
||||
nnoremap <silent> M :bnext<cr>
|
||||
nnoremap <silent> N :bprev<cr>
|
||||
" Moving through windows
|
||||
nnoremap <silent> <C-l> <C-w>l
|
||||
nnoremap <silent> <C-h> <C-w>h
|
||||
|
@ -190,9 +200,9 @@ nnoremap <F1> <nop>
|
|||
vnoremap <F1> <nop>
|
||||
" -- Make Y behave correct
|
||||
map Y y$
|
||||
" -- Easy indenting in visual
|
||||
vnoremap > >gv
|
||||
vnoremap < <gv
|
||||
|
||||
" Showing and hiding special characters
|
||||
nnoremap <silent> <leader>l :set nolist!<cr>
|
||||
|
||||
" Automatic running
|
||||
autocmd filetype python nnoremap <F5> :w<cr>:!python %<cr>
|
||||
|
@ -236,8 +246,11 @@ let g:SuperTabNoCompleteAfter = ['^',',','\s']
|
|||
|
||||
" --- NERDTree config {{{
|
||||
nmap <silent> <leader>e :NERDTreeToggle<CR>
|
||||
" Open NERDTree when vim is started without files to open
|
||||
autocmd StdinReadPre * let s:std_in=1
|
||||
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 NERDChristmasTree = 0
|
||||
let NERDTreeChDirMode = 2
|
||||
|
@ -253,8 +266,8 @@ let g:EasyMotion_do_mapping = 0 " Disable default mappings
|
|||
map / <Plug>(easymotion-sn)
|
||||
omap / <Plug>(easymotion-tn)
|
||||
map ? <Plug>(easymotion-bd-jk)
|
||||
map n <Plug>(easymotion-next)
|
||||
map N <Plug>(easymotion-prev)
|
||||
"map n <Plug>(easymotion-next)
|
||||
"map N <Plug>(easymotion-prev)
|
||||
" }}}
|
||||
|
||||
" --- Auto pairs config {{{
|
||||
|
|
Loading…
Reference in a new issue