-
Notifications
You must be signed in to change notification settings - Fork 0
/
.vimrc
92 lines (77 loc) · 2.09 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
"--- DISPLAY
set title
set ruler
set number relativenumber
set guioptions=T
set wrap
"set hlsearch
set wildmenu
set incsearch "highlight search results as you type
set hidden
set autowrite
set smartcase
set cursorline
set splitbelow
set splitright
set nocompatible
set clipboard=unnamed "allow copy-paste outside of vim
set showcmd
set selection=exclusive "exclude newline character in selection
syntax enable
"--- MOVEMENT
"nnoremap j gj "--Move down by visual line
"nnoremap k gk "--Move up by visual line
"--- FILETYPES AND TYPING
filetype on
filetype plugin on
filetype indent on
set scrolloff=5
"--- PYTHON IDE SETTINGS
au BufRead,BufNewFile *.py,*.pyw,*.c,*.h "match BadWhitespace /\s\+$/
\ set tabstop=4
\ set softtabstop=4
\ set shiftwidth=4
\ set textwidth=79
\ set expandtab
\ set autoindent
\ set encoding=utf-8
"-- THEMES AND VISIBILITY
set background=light
hi Search guibg=peru guifg=wheat
hi Search cterm=NONE ctermfg=grey ctermbg=blue
hi Visual term=reverse cterm=reverse guibg=Grey
"--- AUTOCOMMANDS: MARKDOWN, JSON
au BufNewFile,BufRead *.markdown,*.mdown,*.mkd,*.mkdn,README.md setf markdown
au FileType markdown vmap <Leader><Bslash> :EasyAlign*<Bar><Enter>
au BufNewFile,BufRead *.json setf json
set fileformat=unix
autocmd TextChanged, TextChangedI * silent write
"--- FORCE LOAD ALL PLUGINS
packloadall
let g:table_mode_corner='|'
"--- EasyAlign Plugin
xmap ga <Plug>(EasyAlign)
nmap ga <Plug>(EasyAlign)
"--- WSL YANK SUPPORT
let s:clip = '/mnt/c/Windows/system32/clip.exe'
if executable(s:clip)
augroup WSLYank
autocmd!
autocmd TextYankPost * if v:event.operator==# 'y' | call system(s:clip, @0) | endif
augrıyo END
endif
"--- MAP KEYS
map <F2> o```<CR><CR>```<Esc>o<Esc>kkkA<Space>
map <F3> O```<Esc>jjI```<Esc>kkA<Space>
map <F4> ~w
map <F5> <Esc>:TableModeToggle<Return>
map <F6> 0<Esc>f(ldt/i.<Esc>0
"--- MAP Commands
:command W w
:command Q q
:command Wq wq
:command WQ wq
"--- MACROS
let @w='0€ýaf(ldt/i.€ýaF]i|5000'
"--- This should be the last line:
se mouse+=a