-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvimrc
More file actions
96 lines (81 loc) · 1.96 KB
/
vimrc
File metadata and controls
96 lines (81 loc) · 1.96 KB
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
call pathogen#infect()
filetype plugin indent on
" NERDTree
nmap <silent> <Leader>n :NERDTreeToggle<CR>
let g:NERDTreeDirArrows=0
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTreeType") && b:NERDTreeType == "primary") | q | endif
" Ack.vim
" for Linux
" let g:ackprg="ack-grep -H --nocolor --nogroup --column"
" ctrlp.vim
let g:ctrlp_map = '<c-p>'
let g:ctrlp_cmd = 'CtrlP'
" Tabs
set expandtab
set tabstop=2
set shiftwidth=2
set softtabstop=2
set smarttab
set autoindent
" Color
set t_Co=256
syntax on
set background=dark
colorscheme Tomorrow-Night-Bright
" Look and Feel
set cursorline
set number
set equalalways
set splitbelow splitright
set scrolloff=4
set backspace=indent,eol,start
set shortmess+=I
set clipboard=unnamed
set nopaste
set cmdheight=1
" Make tab completion for files/buffers act like bash"
set wildmenu
" Key Mappings
imap jj <Esc>
inoremap <tab> <c-n>
map <leader>F :Ack<space>
nnoremap <leader><leader> <c-^>
nnoremap <leader>h :set hlsearch!<CR>
" Search
set incsearch
set ignorecase
set smartcase
set hlsearch
" Status Line
set laststatus=2
set statusline+=[%F]
set statusline+=[FORMAT=%{&ff}]
set statusline+=[TYPE=%Y]
set statusline+=[POS=%04l,%04v]
set statusline+=[%p%%]
set statusline+=%*
set ruler
" Always show tab bar
set showtabline=2
" folding settings
set foldmethod=indent "fold based on indent
set foldnestmax=10 "deepest fold is 10 levels
set nofoldenable "dont fold by default
set foldlevel=1 "this is just what i use
" Swap and Backup Files
set nobackup
set nowritebackup
set noswapfile
" Jump to last cursor position when opening a file.
" Do not do it when writing a commit log entry.
autocmd BufReadPost * call SetCursorPosition()
function! SetCursorPosition()
if &filetype !~ 'commit\c'
if line("'\"") > 0 && line("'\"") <= line("$")
exe "normal g`\""
endif
end
endfunction
" Vim Notes
let g:notes_directory = '~/Dropbox/Notes'
let g:notes_suffix = '.txt'