-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
82 lines (59 loc) · 1.95 KB
/
.vimrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
" Plugins
"""""""""""""""""""""""""
execute pathogen#infect()
" Apperance
""""""""""""""""""""""""
syntax on " syntax highlighting
set autoindent " auto indenting
set number " line numbers
set wrap " Wrap lines
set bg=dark " use dark bagground
colorscheme desert " colorscheme desert
" say no to code folding
set foldlevelstart=99
set foldlevel=99
set nofoldenable
let g:vim_markdown_folding_disabled=0
" Behavior
"""""""""""""""""""""""""
" Use Vim settings, rather than Vi settings (much better!).
" This must be first, because it changes other options as a side effect.
set nocompatible
" backspace in insert mode works like normal editor
set backspace=2
filetype indent on " activates indenting for files
set nobackup " get rid of anoying ~file
set laststatus=2 " always show the status line
set history=500 " keep 500 lines of command history
set showcmd " show incomplete commands
set showmatch " show search matches
set ignorecase " use case insensitive searches
set smartcase " unless the search contains a capital letter
" Mappings
" Set the leader key
let mapleader = ","
" Insert an empty line above the current line
map <Leader>O :<C-U>call append(line(".") -1, repeat([''], v:count1))<CR>
" Insert an empty line below the current line
map <Leader>o :<C-U>call append(line("."), repeat([''], v:count1))<CR>
" Ctrl-s for save
map <C-s> <esc>:w<CR>
imap <C-s> <esc>:w<CR>
" Ctrl-f for FZF
map <C-f> <esc>:FZF<CR>
" Use ctrl-[hjkl] to select the active split!
nmap <silent> <c-k> :wincmd k<CR>
nmap <silent> <c-j> :wincmd j<CR>
nmap <silent> <c-h> :wincmd h<CR>
nmap <silent> <c-l> :wincmd l<CR>
" Save file and run last shell command
map \ :w<Enter>:!!<Enter>
" Disable arrow keys
noremap <Up> <NOP>
noremap <Down> <NOP>
noremap <Left> <NOP>
noremap <Right> <NOP>
" Plugins
set rtp+=~/.fzf " FuzzyFinder
" Run flake8 every time a python file is written
autocmd BufWritePost *.py call Flake8()