-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvimrc.after
134 lines (110 loc) · 3.4 KB
/
vimrc.after
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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
let mapleader=","
runtime bundle/vim-pathogen/autoload/pathogen.vim
set nocompatible " be iMproved
execute pathogen#infect()
syntax on
filetype plugin indent on
filetype on
set fileformat=unix
set fileformats=unix,dos
set backspace=2 " Backspace works with deleting newlines etc
"set nobinary
" Color
set t_Co=256
set background=dark
"colorscheme ir_black " nice readability
" colorscheme apprentice " https://github.com/romainl/Apprentice
colorscheme slate
" colorscheme lapis256 " Nice and blue
highlight ColorColumn ctermbg=000
"colorscheme kellys "dark, blue and orange = nice
" CtrlP for fuzzy finding files"
map <Leader>t :CtrlP<CR>
map <Leader>b :CtrlPBuffer<CR>
let g:ctrlp_user_command = 'ag %s -i --nocolor --nogroup --hidden
\ --ignore .git
\ --ignore .svn
\ --ignore .hg
\ --ignore .DS_Store
\ --ignore "**/*.pyc"
\ --ignore "**/*.class"
\ -g ""'
" NERDTree
map <silent> <Leader>n :NERDTreeToggle<CR>
map <Leader>j :NERDTreeFind<CR>
let NERDTreeMinimalUI = 1
let NERDTreeDirArrows = 1
" Commenting
let NERDSpaceDelims=1
let g:NERDDefaultAlign = 'left'
" Searching
set hlsearch " highlight searches
set incsearch "search while typing
" Encoding
set encoding=utf-8
" Whitespace and lines
set nolist " No list characters
set wrap
set linebreak
set showbreak=¬
set tabstop=2
set softtabstop=2
set autoindent " indent at the same level of the previous line
set shiftwidth=2 " use indents of 4 spaces
set expandtab " tabs are spaces, not tabs
set tabpagemax=15 " only show 15 tabs
set nocursorline " No cursor line, thanks
set nonumber " No need for line numbers
set showmode " display the current mode
set colorcolumn=0
"set textwidth=120
" Curly brackets
inoremap { {}<Left>
inoremap {<CR> {<CR>}<Esc>O
inoremap {{ {
inoremap {} {}
"Sessions
set sessionoptions-=options
map <F9> :mksession! ~/vim_session <cr> " Quick write session with F9
map <F10> :source ~/vim_session <cr> " And load session with F10
nmap <buffer> <silent> <F1> :exec 'silent !open "'. escape('http://www.google.com/search?q='.expand('<cword>').'&btnI=745', ' &!%').'"'<cr>:redraw!<cr>
map <Leader>r :mak<CR>
"Autocommands
autocmd Filetype java set makeprg=javac\ %
autocmd FileType python set makeprg=python\ %
autocmd FileType ruby set makeprg=ruby\ %
autocmd FileType javascript map <C-R> :! node %<CR>
autocmd FileType javascript map <Leader>r :! node %<CR>
"autocmd BufWritePre *.js :eslint %\
autocmd FileType ruby map <Leader>r :! ruby %<CR>
autocmd FileType gitcommit set colorcolumn=73
autocmd FileType gitcommit set textwidth=72
"Shortcuts
map <Leader>m :mak<CR>
map <Leader>g :!git status<CR>
map <Leader>p :PomodoroToDoToday<CR>
map <Leader>f :Ag
"Markdown settings:
let g:vim_markdown_folding_disabled=1
"Airline settings:
set laststatus=2
let g:airline_powerline_fonts = 1
"
"let g:airline#extensions#syntastic#enabled = 1
"Syntastic
"let g:syntastic_always_populate_loc_list = 1
"let g:syntastic_auto_loc_list = 1
"let g:syntastic_check_on_open = 1
"let g:syntastic_check_on_wq = 0
"NeoMake
autocmd! BufWritePost * Neomake
"Masochist mode - disable arrow keys:
"noremap <Up> ""
"noremap! <Up> <Esc>
"noremap <Down> ""
"noremap! <Down> <Esc>
"noremap <Left> ""
"noremap! <Left> <Esc>
"noremap <Right> ""
"noremap! <Right> <Esc>
set history=1000 " Store a ton of history (default is 20)