-
Notifications
You must be signed in to change notification settings - Fork 0
/
win_vimrc
91 lines (80 loc) · 2.38 KB
/
win_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
set langmenu=en_US
let $LANG = 'en_US'
source $VIMRUNTIME/delmenu.vim
source $VIMRUNTIME/menu.vim
set nu ai expandtab tabstop=3 shiftwidth=3 history=3000 cursorline laststatus=2 statusline+=%<%F\ %h%m%r%=%-16.(%l,%c%V%)\ %P ignorecase smartcase showcmd t_Co=256 backspace=indent,eol,start encoding=utf-8 nocompatible ttimeoutlen=5
set undodir=~/.vim/.undo//
set backupdir=~/.vim/.backup//
set directory=~/.vim/.swp//
filetype indent on
syntax on
runtime liparadise_color_debian.vim
runtime liparadise_tabline.vim
autocmd VimEnter * call My_stop_hide_underscore()
if !&diff
autocmd VimEnter * call My_dark_theme()
endif
" Some mapleader Settings
let mapleader=" "
" For quick markdown highlight
vnoremap <Leader>H c__*<C-r>"*__
vnoremap <Leader>h c__<C-r>"__
vnoremap <Leader>a c*<C-r>"*
" isnot#
" enable truecolor when feasible
if exists('+termguicolors')
if ( (($TERM !~? '^linux$') && ($TERM !~? '^screen$')) || has("win32") )
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
set termguicolors
endif
endif
" vim highlight is broken in many ways....
" this fixes ayu colorscheme with markdown
" basically, stop it from hiding '_'
function! My_stop_hide_underscore()
set concealcursor="nc"
endfunction
" language
if has("gui_running")
set encoding=utf-8
set fileencodings=utf-8,chinese,latin-1
if has("gui_gtk2")
set guifont=Inconsolata\ 12
elseif has("gui_macvim")
set guifont=Menlo\ Regular:h14
elseif has("gui_win32")
set guifont=Cascadia_Code:h13
endif
else
hi linenr cterm=NONE ctermfg=244 ctermbg=NONE guibg=NONE guifg=NONE
hi cursorlinenr cterm=NONE ctermfg=255 ctermbg=NONE guibg=NONE guifg=NONE
hi cursorline cterm=NONE ctermfg=NONE ctermbg=NONE guibg=NONE guifg=NONE
endif
"enable 256 colors in ConEmu on Win CLI
if has('win32') && !has('gui_running') && !empty($CONEMUBUILD)
set term=xterm
set t_Co=256
let &t_AB="\e[48;5;%dm"
let &t_AF="\e[38;5;%dm"
endif
" ConEmu backspace is buggy
inoremap <Char-0x07F> <BS>
nnoremap <Char-0x07F> <BS>
" handling lambda functions;
function! Lambda_cpp()
setlocal cindent cino=j1,(0,ws,Ws,N-s
endfunction
" handling en spell check;
function! Spell_On_Off()
setlocal spell! spelllang=en
echohl None
echo "Spell Check is now "
echohl Boolean
if &spell
echo "ON"
else
echo "OFF"
endif
echohl None
endfunction