-
Notifications
You must be signed in to change notification settings - Fork 0
/
vimrc
96 lines (77 loc) · 2.2 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
" Max Zawisa's .vimrc
set nocompatible " only use this .vimrc.
" Syntax and indentation
filetype plugin indent on
syntax on " Turns on syntax highlighting.
set foldmethod=syntax
" Indentation Options
set expandtab " This expands tabs into spaces.
set tabstop=4 " this sets tab width to 4 spaces
set softtabstop=4
set shiftwidth=4 " When shifting, indent using 4 spaces.
set autoindent " new lines inherit the indentation of previous lines.
set smartindent
set smarttab
set list
set listchars=tab:▸\ ,trail:.
" Search Options
set hlsearch " This highlights search results.
set ignorecase " This ignores case when searching.
set incsearch " Show incremental searches.
set smartcase " Switch to case sensitive when uppercase is present in search.
" Mouse
if has('mouse')
set mouse=a
endif
" User Interface Options
set number " Turns on line numbers.
set relativenumber
set background=dark
"colorscheme desert " Sets the default color scheme.
set textwidth=120 " Sets the text width.
set nowrap " Enable line wrapping.
if exists('+colorcolumn') " Adds color column at 80 characters.
set colorcolumn=120
endif
set title " Sets the title of the window to the current file name.
set showmatch " Highlight matching parenthesis.
set scrolloff=8
set sidescrolloff=8
" Miscellaneous Options
set history=1000 " Increase history.
set showcmd " Show partial commands.
set wildmenu " Allows tab completion in menu.
set cmdheight=2 " Sets menu height to 2 lines.
set autoread " Reload files if changed externally.
set signcolumn=yes
set shortmess+=W
set shortmess+=c
set shortmess+=C
set nobackup
set nowritebackup
set updatetime=300
set timeoutlen=500
set exrc
set undofile
set undodir=~/.vim/undodir
set ruler
" netrw
let g:netrw_bufsettings = "noma nomod nonu nobl nowrap ro rnu"
let g:netrw_preview = 1
let g:netrw_winsize = 40
let g:netrw_altfile = 1
let g:netrw_keepj = "keepj"
" Mappings
" Set <leader> to Space
let mapleader = " "
" The next two lines make ; act like : so that you don't have to
" use ;; for ; instead
map ; :
noremap ;; ;
" Maps jk to <ESC> when in insert mode
inoremap jk <ESC>
set backspace=indent,eol,start
" Moving lines
vnoremap J :m '>+1<CR>gv=gv
vnoremap K :m '<-2<CR>gv=gv
nmap <leader>e <CMD>Explore<CR>