better line numbering, colorcolumns
This commit is contained in:
parent
d1627169cb
commit
ca9a774280
|
@ -1,4 +1,8 @@
|
|||
let g:netrw_dirhistmax =10
|
||||
let g:netrw_dirhist_cnt =2
|
||||
let g:netrw_dirhist_cnt =6
|
||||
let g:netrw_dirhist_1='/home/ray/.screenlayout'
|
||||
let g:netrw_dirhist_2='/home/ray/.config/i3status'
|
||||
let g:netrw_dirhist_3='/home/ray/Projects/Vue/vx/src/components'
|
||||
let g:netrw_dirhist_4='/home/ray/Projects/Vue/vx/src'
|
||||
let g:netrw_dirhist_5='/home/ray/Projects/Vue/vx/src/sass'
|
||||
let g:netrw_dirhist_6='/home/ray/Projects/Vue/vx/src/components'
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
" Vim color file
|
||||
|
||||
set bg=dark
|
||||
set background=dark
|
||||
hi clear Normal
|
||||
hi clear
|
||||
if exists("syntax_on")
|
||||
if exists('syntax_on')
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
set fillchars=stl:\ ,stlnc:\ ,vert:\
|
||||
|
||||
let colors_name = "customred256"
|
||||
let colors_name = 'customred256'
|
||||
|
||||
|
||||
hi Normal ctermfg=246 ctermbg=none
|
||||
|
@ -317,22 +317,30 @@ hi StatusLine ctermfg=255 ctermbg=239 term=none cterm=none
|
|||
hi StatusLineNC ctermfg=238 ctermbg=233 term=none cterm=none
|
||||
" set status to change the status line based on mode
|
||||
if version >= 700
|
||||
augroup statuscursorlines
|
||||
au InsertEnter * hi StatusLine ctermfg=233 ctermbg=255
|
||||
au InsertLeave * hi StatusLine ctermfg=255 ctermbg=239
|
||||
|
||||
au InsertEnter * set cursorline
|
||||
au InsertLeave * set nocursorline
|
||||
augroup END
|
||||
endif
|
||||
|
||||
hi VertSplit ctermfg=233 ctermbg=233 term=none cterm=none
|
||||
hi VertSplit ctermfg=16 ctermbg=16 term=none cterm=none
|
||||
hi Folded ctermfg=243 ctermbg=232 cterm=bold term=bold
|
||||
hi FoldColumn ctermfg=239 ctermbg=232 cterm=bold term=bold
|
||||
hi FoldColumn ctermfg=239 ctermbg=none cterm=bold term=bold
|
||||
hi LineNr ctermfg=239 ctermbg=none cterm=none
|
||||
hi CursorLineNr ctermfg=243 ctermbg=none cterm=none
|
||||
hi EndOfBuffer ctermfg=233 ctermbg=none
|
||||
hi ColorColumn ctermbg=233
|
||||
hi SignColumn ctermfg=255 ctermbg=none
|
||||
|
||||
augroup linenrcolor
|
||||
au InsertEnter * hi LineNr ctermfg=236
|
||||
au InsertEnter * hi CursorLineNr ctermfg=248
|
||||
au InsertLeave * hi LineNr ctermfg=239
|
||||
au InsertLeave * hi CursorLineNr ctermfg=243
|
||||
augroup END
|
||||
|
||||
hi DiffAdd guibg=darkblue ctermbg=darkblue term=none cterm=none
|
||||
hi DiffChange guibg=darkmagenta ctermbg=magenta cterm=none
|
||||
|
|
29
vimrc
29
vimrc
|
@ -232,9 +232,6 @@ set statusline+=%*
|
|||
" always show statusline
|
||||
set laststatus=2
|
||||
|
||||
" set a right margin and it's colour
|
||||
set colorcolumn=80
|
||||
|
||||
set foldmethod=manual
|
||||
|
||||
set autoindent
|
||||
|
@ -259,11 +256,13 @@ set pastetoggle=<F2>
|
|||
set showmode
|
||||
|
||||
" set custom syntax highlighting
|
||||
autocmd BufNewFile,BufRead *.html set syntax=html_custom
|
||||
autocmd BufNewFile,BufRead *.php set syntax=php_custom
|
||||
autocmd BufNewFile,BufRead *.vue set syntax=vue_custom
|
||||
autocmd BufNewFile,BufRead *.vue syntax sync fromstart
|
||||
autocmd BufNewFile,BufRead *.js set syntax=pangloss_javascript_custom
|
||||
augroup syntaxhighlighting
|
||||
autocmd BufNewFile,BufRead *.html set syntax=html_custom
|
||||
autocmd BufNewFile,BufRead *.php set syntax=php_custom
|
||||
autocmd BufNewFile,BufRead *.vue set syntax=vue_custom
|
||||
autocmd BufNewFile,BufRead *.vue syntax sync fromstart
|
||||
autocmd BufNewFile,BufRead *.js set syntax=pangloss_javascript_custom
|
||||
augroup END
|
||||
|
||||
" fix higlight problems such as vertical-align etc
|
||||
augroup VimCSS3Syntax
|
||||
|
@ -279,7 +278,17 @@ augroup coloreload
|
|||
au BufWritePost customred256.vim so $MYVIMRC
|
||||
augroup end
|
||||
|
||||
augroup linenumbering
|
||||
autocmd InsertEnter * :set norelativenumber
|
||||
autocmd InsertLeave * :set number relativenumber
|
||||
autocmd WinEnter * :set number relativenumber
|
||||
autocmd WinLeave * set norelativenumber
|
||||
augroup END
|
||||
|
||||
augroup colorcolumns
|
||||
autocmd WinEnter * set colorcolumn=80
|
||||
autocmd WinLeave * set colorcolumn=0
|
||||
augroup END
|
||||
|
||||
" Automatically reload .vimrc if chanaged
|
||||
augroup myvimrc
|
||||
|
@ -389,7 +398,9 @@ let g:UltiSnipsJumpBackwardTrigger='<c-z>'
|
|||
nnoremap <F3> :NERDTreeFocus<CR>
|
||||
nnoremap <leader>nt :NERDTreeFocus<CR>
|
||||
" allow closing if only window open is a NERDTree
|
||||
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
||||
augroup nerdtreewindow
|
||||
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
||||
augroup END
|
||||
let NERDTreeQuitOnOpen = 1
|
||||
|
||||
" TagBar
|
||||
|
|
Loading…
Reference in New Issue