-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc.future
121 lines (83 loc) · 4.99 KB
/
.vimrc.future
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
" Handcrafted with :) by Sebastián J. Seba (https://ssebastianj.github.io/)
"#g ======================================= General ===============================================
set nocompatible " Use vi improved mode (no compatible with vi)
set encoding="utf-8" " Set default encoding
set fileencoding="utf-8" " Set default file encoding
set printencoding="utf-8" " Set the character encoding when printing
set autoread " Automatically read a file if it was changed outside Vim
set fileformats="unix,dos,mac" " EOF formats preference
set noerrorbells " Don't play beeps
set number " Show line numbers
set showmatch " Highlight matching brace
set showmode " Put a message on the last line (Insert, Replace, Visual)
set cursorline " Highlight current line
set wildmenu " Visual autocomplete for command menu
set nowrap " Don't wrap long lines
set autoindent " Auto-indent new lines
set smartindent " Enable smart-indent
set smarttab " Enable smart-tabs
set expandtab " Use spaces instead of tabs
set shiftwidth=4 " Number of auto-indent spaces
set softtabstop=4 " Number of spaces per Tab when editing
set tabstop=4 " Number of visual spaces per TAB
set hlsearch " Highlight search results
set incsearch " Searches for strings incrementally
set smartcase " Enable smart-case search
set ruler " Show row and column ruler information
set showtabline=2 " Show tab bar
set undolevels=1000 " Number of undo levels
set backspace=indent,eol,start " Backspace behavior
set nofoldenable " Code folding
set foldmethod=indent " Fold based on indent level
set hidden " Keep more info in memory to speed things up
set history=1024 " Set number of history levels
set background=dark " Prefer a darker background
colorscheme evening " Set a colorscheme
set nospell " Disable spellchecking
set splitbelow " When splitting a window, put the new window below
set splitright " When splitting a window, put the new window to the right
syntax on " Enable syntax processing
filetype on
filetype indent on " Load filetype-specific indent files
filetype plugin indent on " Enable filetype clever mechanisms
set notimeout " Disable timeout...
set ttimeout " ...but enable this to time out on key codes
set ttimeoutlen=100 " Time (ms) waited for a key code
set nobackup " Don't make a backup before overwriting a file
set writebackup " Make a backup before overwriting a file
set backupdir=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
set directory=~/.vim-tmp,~/.tmp,~/tmp,/var/tmp,/tmp
"#fts ================================ Filetypes Settings ========================================
"----- Python -----------------------------------
let python_no_number_highlight=0
let python_no_builtin_highlight=0
let python_no_exception_highlight=0
let python_no_doctest_highlight=0
let python_no_doctest_code_highlight=1
let python_space_error_highlight=1
autocmd BufNewFile,BufRead *.py,*.pyw setlocal tabstop=4 softtabstop=4 shiftwidth=4 textwidth=80 smarttab expandtab
"#km ====================================== Keymaps ===============================================
" Leader is comma
let mapleader=","
let g:mapleader=","
" Reload vim without having to restart editor
map <leader>s :source ~/.vimrc<CR>
" Cancel a search with `Escape`
nnoremap <silent> <Esc> :nohlsearch<Bar> :echo<CR>
" Re-open previously opened file
nnoremap <Leader><Leader> :e#<CR>
" Space open/closes folds
nnoremap <space> za
" Edit vimrc/zshrc/bashrc and load vimrc bindings
nnoremap <leader>ev :vsp ~/.vimrc<CR>
nnoremap <leader>ez :vsp ~/.zshrc<CR>
nnoremap <leader>eb :vsp ~/.bashrc<CR>
nnoremap <leader>sv :source ~/.vimrc<CR>
"#pl =================================== Plugins List =============================================
" https://github.com/tpope/vim-fugitive
" https://github.com/airblade/vim-gitgutter
" https://github.com/kien/ctrlp.vim.git
"#pc =================================== Plugins Config ===========================================
"#ui =========================================== UI =============================================
" Font
set guifont=DejaVu\ Sans\ Mono\ for\ Powerline:h14