Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- " VIM Configuration File
- " Author: Daniel <Daphron> Kaczmarek
- " set UTF-8 encoding
- set enc=utf-8
- set fenc=utf-8
- set termencoding=utf-8
- " disable vi compatibility (emulation of old bugs)
- set nocompatible
- " use indentation of previous line
- set autoindent
- " configure tabwidth and insert spaces instead of tabs
- set tabstop=8 " tab width is 4 spaces
- set shiftwidth=4 " indent also with 4 spaces
- set expandtab " expand tabs to spaces
- set softtabstop=4
- " wrap lines at 120 chars. 80 is somewaht antiquated with nowadays displays.
- set textwidth=0
- set wrapmargin=0
- set wrap
- " turn syntax highlighting on
- set t_Co=256
- syntax on
- " turn line numbers on
- set number
- " highlight matching braces
- set showmatch
- " intelligent comments
- set comments=sl:/*,mb:\ *,elx:\ */
- " remap ii to exit to command mode
- inoremap jj <ESC>
- " Code folding
- set foldmethod=indent
- set foldlevel=99
- "set foldnestmax=2
- nnoremap <space> za
- vnoremap <space> zf
- "Set a smaller timeout
- set ttimeoutlen=100
- " C + dir instead of C+ w then dir
- map <c-j> <c-w>j
- map <c-k> <c-w>k
- map <c-l> <c-w>l
- map <c-h> <c-w>h
- "Try to detect filetypes
- filetype on
- colorscheme molokai
- filetype plugin indent on
- map <F4> :NERDTreeToggle<CR> " map f4 to open NerdTree
- map <buffer> <F7> :w<CR>:!/usr/bin/env python2 % <CR>
- map <buffer> <F8> :w<CR>:!/usr/bin/env python % <CR>
- "Execute file being edited with <Shift> + e:
- map <buffer> <S-e> :w<CR>:!/usr/bin/env python2 % <CR>
- "Pydiction tab completion
- let g:pydiction_location = '/home/xeno/repos/config-files/.vim/pydiction/complete-dict'
- "Only do this if compiled with support for autocommands.
- if has("autocmd")
- autocmd FileType python set complete+=k~/.vim/syntax/python.vim isk+=.,(
- autocmd Filetype java setlocal omnifunc=javacomplete#Complete
- autocmd FileType python set omnifunc=pythoncomplete#Complete
- let g:SuperTabDefaultCompletionType = "context"
- endif
- "Enable dictionary (Ctrl-x Ctrl-k)
- set dictionary+=/usr/share/dict/cracklib-small
- "Filename is Ctrl-x Ctrl-f
- "Line is Ctrl-x Ctrl-l
- "Word/Pattern Ctrl-x Ctrl-n
- "
- nmap <leader>a <Esc>:Ack!
- "Useful vim commands for me to memorize
- ":w !sude tee % This will allow you to save the file you are editing if you need root.
- "Use relative line numbering
- set relativenumber
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement