-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc-macOS
72 lines (63 loc) · 1.63 KB
/
.vimrc-macOS
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
" @rfaile313 MacOS vimrc
" If you paste this into a file
" Don't autocomment - add this first, then save
" Otherwise if you curl into stdin or something, no worries
au BufEnter * set fo-=c fo-=r fo-=o
" Regular stuff from here
"------------------------
set number
syntax on
set termguicolors
set showcmd
set wildmenu
set bs=2
set encoding=utf-8
set modelines=0
set wrap
" Stops text at column 100
" Note(rudy): lets try this off for a while
" set textwidth=100
set shiftwidth=4
set tabstop=4
set softtabstop=4
set scrolloff=3
set backspace=indent,eol,start
set history=500
set ignorecase
set smartcase
set hlsearch
set showmatch
set mat=2
" color
colorscheme sonokai
" set paste messes with autocompletion
" set paste
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Indent if we're at the beginning of a line. Else, do completion.
"NOTE(Rudy): DOES NOT WORK WITH :set paste
function! InsertTabWrapper()
let col = col('.') - 1
if !col || getline('.')[col - 1] !~ '\k'
return "\<tab>"
else
return "\<c-p>"
endif
endfunction
inoremap <expr> <tab> InsertTabWrapper()
inoremap <s-tab> <c-n>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Move between windows with ctrl <-- -->
nmap <silent> <C-Right> :wincmd l<CR>
nmap <silent> <C-Left> :wincmd h<CR>
" Open :Explore iwith ctrl+e in normal mode
nnoremap <silent> <C-E> :Explore<CR>
" remove highlighting after search with comma-space
nnoremap <silent> ,<space> :nohlsearch<CR>
" Remap q to Q (macro)
" Helps hit it less
nnoremap Q q
nnoremap q <Nop>
" Notes --
" option+click with mouse works by default
" Vertical split
" :Vex