-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.vimrc_default
65 lines (55 loc) · 1.67 KB
/
.vimrc_default
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
set nocompatible
filetype plugin indent on
syntax on
source ~/bin/VimFiles/.vimrc_bundles
colorscheme desert
"Default {{{
let mapleader = ","
let g:mapleader = ","
set expandtab "Expands tabs
set number "Line numbers
set backspace=indent,eol,start "backspace will account for these 3 situations.
set tabstop=2 "Tabs are 2 spaces
set softtabstop=2 "Number of spaces a tab counts for
set shiftwidth=2 "AudoIndent spaces
set smarttab "Uses shiftwidth. BS will delete the full tab.
set showmatch "Shows matching braces
nnoremap <leader>ev :vsplit $MYVIMRC<cr>
nnoremap <leader>sv :vsplit $MYVIMRC<cr>
"}}}
"KeyMappings {{{
inoremap <c-d> <esc>yypi
imap jj <esc>
"}}}
"Tab/Window Management{{{
nnoremap _ <C-W>-
nnoremap + <C-W>+
nnoremap - <C-W><
nnoremap = <C-W>>
nnoremap <C-j> <C-W>j
nnoremap <C-k> <C-W>k
nnoremap <C-l> <C-W>l
nnoremap <C-h> <C-W>h
nnoremap <silent><c-p> :tabp <CR>
nnoremap <silent><c-n> :tabn <CR>
"}}}
"Searching {{{
set hlsearch
set incsearch
set ignorecase
set smartcase
"}}}
"Python {{{
autocmd FileType python nnoremap <buffer> <leader>c I#
autocmd FileType python nnoremap <buffer> <leader>d I'''
autocmd BufRead,BufNewFile *.py setlocal tabstop=4
autocmd BufRead,BufNewFile *.py setlocal softtabstop=4
autocmd BufRead,BufNewFile *.py setlocal shiftwidth=4
autocmd BufRead,BufNewFile *.py setlocal textwidth=80
autocmd BufRead,BufNewFile *.py setlocal smarttab
autocmd BufRead,BufNewFile *.py setlocal expandtab
"}}}
"Vimrc {{{
autocmd BufRead,BufNewFile *vimrc* iabbrev nno nnoremap
autocmd BufRead,BufNewFile *vimrc* iabbrev ino inoremap
"}}}