Skip to content

Instantly share code, notes, and snippets.



Last active Dec 4, 2018
What would you like to do?
My .vimrc
set nocompatible
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
Plugin 'gmarik/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'davidhalter/jedi-vim'
Plugin 'vim-latex/vim-latex'
Plugin 'vim-syntastic/syntastic'
Plugin 'scrooloose/nerdtree'
Plugin 'Xuyuanp/nerdtree-git-plugin'
Plugin 'majutsushi/tagbar'
Plugin 'godlygeek/tabular'
Plugin 'plasticboy/vim-markdown'
Plugin 'vim-airline/vim-airline'
Plugin 'tpope/vim-surround'
Plugin 'scrooloose/nerdcommenter'
Plugin 'mattboehm/vim-unstack'
Plugin 'mattboehm/vim-accordion'
Plugin 'easymotion/vim-easymotion'
Plugin 'jiangmiao/auto-pairs'
Plugin 'alfredodeza/coveragepy.vim'
Plugin 'aserebryakov/vim-todo-lists'
Plugin 'andrewradev/linediff.vim'
Plugin 'pangloss/vim-javascript'
Plugin 'vim-scripts/dbext.vim'
call vundle#end()
set hidden
set ruler
set number
highlight LineNr ctermbg=black
highlight LineNr ctermfg=darkgrey
set wildmenu
set showcmd
set scrolloff=10
filetype plugin indent on
set smartindent
set smartcase
set sw=4
set expandtab
set background=dark
set mouse=a
syntax enable
set incsearch
autocmd FileType javascript set omnifunc=javascriptcomplete#CompleteJS
autocmd FileType python set foldmethod=indent
autocmd FileType html set foldmethod=indent
set grepprg=grep\ -nH\ $*
let g:tex_flavor='pdflatex'
let g:Tex_DefaultTargetFormat='pdf'
let g:jedi#force_py_version = 3
" Add the virtualenv's site-packages to vim path
if has('python')
py << EOF
import os.path
import sys
import vim
if 'VIRTUAL_ENV' in os.environ:
project_base_dir = os.environ['VIRTUAL_ENV']
sys.path.insert(0, project_base_dir)
activate_this = os.path.join(project_base_dir, 'bin/')
execfile(activate_this, dict(__file__=activate_this))
" Syntastic
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
let g:syntastic_python_pylint_args = "--disable=C,R"
" NERDTree
let NERDTreeQuitOnOpen = 1
let NERDTreeShowBookmarks = 1
" Tagbar
let g:tagbar_autofocus = 1
let g:tagbar_compact = 1
" Markdown
let g:vim_markdown_folding_level = 2
let g:vim_markdown_new_list_item_indent = 2
let g:vim_markdown_toc_autofit = 1
" Shortcuts
map <F2> :NERDTreeToggle<CR>
map <F3> :TagbarToggle<CR>
autocmd FileType markdown map <buffer> <F3> :Toc<CR>
autocmd FileType markdown map <buffer> <F4> :TableFormat<CR>
map <F9> :Gstatus<CR>
map <S-F9> :Gdiff<CR>
map <C-S-F9> :Gcommit<CR>
let g:unstack_mapkey="<F10>"
" This file contains the secrets that aren't published ;)
source ~/.vimrc-secrets

This comment has been minimized.

Copy link

@rallar rallar commented Aug 26, 2017

Ich hab ein rudimentäres .vimrc aber gesehen dass Dir ein paar Einträge von mir fehlen, die ich sehr nützlich finde. Vielleicht ist was für Dich dabei. :-)

" Enable filetype plugins
filetype plugin on
filetype indent on

" show current position
set ruler

" enable syntax highlighting
syntax enable

set encoding=utf8

set ffs=unix,dos,mac

set nobackup
set nowb
set noswapfile

set expandtab
set smarttab

set shiftwidth=4
set tabstop=4

set ai "Auto indent
set si "Smart indent
set wrap "Wrap lines


This comment has been minimized.

Copy link

@drwetter drwetter commented Aug 26, 2017

my 2 bits (added):

" unset this aggravating mouse thing
set mouse=

" F5: Reformat current paragraph
map <F5> gq}
" F2: Toggle pastemodus
nnoremap <F2> :set invpaste paste?<CR>
set pastetoggle=<F2>
set paste       " default!
set showmode

set ruler               " S

" F8: Write a im fmt line
map <F8> i  vim:tw=95:ts=5:sw=5<CR>

function! BgToggle()
  if &background == "light"
    execute ":set background=dark"
    execute ":set background=light"
nnoremap <F12> :call BgToggle()<CR>

autocmd FileType javascript noremap <buffer>  <c-f> :call JsBeautify()<cr>
how the line and column numbers of the cursor. Should be after the above...

" Highlight_unwanted_spaces
highlight ExtraWhitespace ctermbg=red guibg=red
match ExtraWhitespace /\s\+$/

This comment has been minimized.

Copy link
Owner Author

@thomaspatzke thomaspatzke commented Aug 26, 2017

Nice, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.