-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrc.vim
More file actions
66 lines (57 loc) · 2.36 KB
/
rc.vim
File metadata and controls
66 lines (57 loc) · 2.36 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
"" Run Commands
" === Files and buffers
set hidden " Don't unload abandoned buffers.
set noswapfile " Disable the creation of .swp files.
set undofile " Enable persistent undo.
" === Status bar
set wildmode=longest:full " Wildmenu behaves like bash.
set noshowmode " Don't show current mode.
set showcmd " Show current command.
" === Lines and line numbering
set number " Line numbers (absolute).
set relativenumber " Line numbers (relative).
set cursorline " Highlight the current line.
set colorcolumn=80 " Line length marker.
set scrolloff=5 " Cursor's page padding.
" === Indentation
set expandtab " <TAB> inserts whitespaces.
"set noexpandtab " <TAB> inserts tabs.
set tabstop=4 " How long an actual tab is.
set shiftwidth=4 " Length of each indentation step.
set softtabstop=4 " Number of whitespaces seen as a tab.
set breakindent " Keep indentation on wrapped lines.
" Use actual tabs when editing certain filetypes:
autocmd FileType go,html,make setlocal noexpandtab
" Remove trailing whitespaces when saving certain filetypes:
"autocmd FileType c,cpp,css,go,html,perl,php,python
" \ autocmd BufWritePre <buffer> :%s/\s\+$//e
" === Search
"set noincsearch " Disable incremental search.
set ignorecase " Ignore case...
set smartcase " ...unless we start with upper case.
" === Autocompletion
set completeopt-=preview " Disable the preview window.
set pumheight=10 " Number of items in the menu.
set infercase " Smarter case during autocompletion.
" === Mouse support
set mouse=a
" === Clipboard
if $TERM != 'linux'
if has ('unnamedplus')
set clipboard=unnamedplus
else
set clipboard=unnamed
endif
endif
" === Aestetics
if &t_Co == 256
colorscheme xoria256mod
else
colorscheme strange
endif
" Change the cursor when changing modes (if the terminal emulator supports it):
if $TERM != 'linux'
"let NVIM_TUI_ENABLE_CURSOR_SHAPE=1
set guicursor=n-v-c:block-Cursor/lCursor-blinkon0,i-ci:ver25-Cursor/lCursor,r-cr:hor20-Cursor/lCursor
autocmd VimLeave * set guicursor=a:block-blinkon0
endif