Merge branch 'dev' of https://github.com/Donaldttt/dotfiles into dev
This commit is contained in:
@@ -3,6 +3,9 @@ set-option -sg escape-time 10
|
|||||||
set -g default-terminal "xterm-256color"
|
set -g default-terminal "xterm-256color"
|
||||||
set-option -g history-limit 6000
|
set-option -g history-limit 6000
|
||||||
|
|
||||||
|
# turn off status line
|
||||||
|
set -g status off
|
||||||
|
|
||||||
set-option -sa terminal-overrides ',xterm-256color:RGB'
|
set-option -sa terminal-overrides ',xterm-256color:RGB'
|
||||||
setw -g mode-keys vi
|
setw -g mode-keys vi
|
||||||
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
||||||
|
|||||||
@@ -145,6 +145,9 @@
|
|||||||
" set nolist " let vim not showing '$' or other sign
|
" set nolist " let vim not showing '$' or other sign
|
||||||
set list " Display unprintable characters f12 - switches
|
set list " Display unprintable characters f12 - switches
|
||||||
|
|
||||||
|
" stop inserting the current comment leader after hitting 'o' or 'O' in Normal mode
|
||||||
|
au FileType java setlocal formatoptions-=o
|
||||||
|
|
||||||
set listchars=tab:•\ ,trail:•,extends:»,precedes:« " Unprintable chars mapping
|
set listchars=tab:•\ ,trail:•,extends:»,precedes:« " Unprintable chars mapping
|
||||||
|
|
||||||
"Remove all trailing whitespace by pressing <leader>ws
|
"Remove all trailing whitespace by pressing <leader>ws
|
||||||
|
|||||||
+22
-44
@@ -1,20 +1,12 @@
|
|||||||
" If anything not work as expected. Please make sure all plugins
|
" (jump to the topic)
|
||||||
" are installed by running:
|
|
||||||
" :PlugInstall
|
|
||||||
"
|
"
|
||||||
" Content
|
" PLUGIN_INSTALL
|
||||||
" ('#' jump to the topic)
|
" PLUGIN_CONFIGURATION
|
||||||
"
|
" THEME_CONFIGURATION
|
||||||
" Plugin_Install
|
" KEY_MAPS
|
||||||
" Plugin_Preferences
|
" OTHER_CONFIGS
|
||||||
" Theme_Appearance
|
|
||||||
" Key_Mappings
|
|
||||||
" Useful_Info
|
|
||||||
|
|
||||||
" Environment {
|
" PLUGIN_INSTALL
|
||||||
" }
|
|
||||||
|
|
||||||
" Plugin_Install
|
|
||||||
" {
|
" {
|
||||||
" Plugin environment
|
" Plugin environment
|
||||||
let g:mydotfiles_directory = expand('~/.dotfiles/')
|
let g:mydotfiles_directory = expand('~/.dotfiles/')
|
||||||
@@ -75,7 +67,6 @@
|
|||||||
" The bottom buffer display
|
" The bottom buffer display
|
||||||
Plug 'Donaldttt/vim-bufferline'
|
Plug 'Donaldttt/vim-bufferline'
|
||||||
Plug 'ryanoasis/vim-devicons'
|
Plug 'ryanoasis/vim-devicons'
|
||||||
" Plug 'lambdalisue/nerdfont.vim'
|
|
||||||
Plug 'sainnhe/everforest'
|
Plug 'sainnhe/everforest'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -83,14 +74,10 @@
|
|||||||
Plug 'neoclide/coc.nvim', Cond(!exists('g:vscode'), {'branch': 'release'})
|
Plug 'neoclide/coc.nvim', Cond(!exists('g:vscode'), {'branch': 'release'})
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" only work with nvim > 0.5
|
|
||||||
" For other versions, just loading the plugin may
|
|
||||||
" cause error
|
|
||||||
if g:vim_type == 'nvim'
|
if g:vim_type == 'nvim'
|
||||||
if g:vim_version >= 0.5
|
if g:vim_version >= 0.5
|
||||||
Plug 'xiyaowong/nvim-transparent', Cond(!exists('g:vscode'))
|
Plug 'xiyaowong/nvim-transparent', Cond(!exists('g:vscode'))
|
||||||
Plug 'lukas-reineke/indent-blankline.nvim', Cond(!exists('g:vscode'))
|
Plug 'lukas-reineke/indent-blankline.nvim', Cond(!exists('g:vscode'))
|
||||||
" nvim theme
|
|
||||||
Plug 'EdenEast/nightfox.nvim', Cond(!exists('g:vscode'))
|
Plug 'EdenEast/nightfox.nvim', Cond(!exists('g:vscode'))
|
||||||
Plug 'projekt0n/github-nvim-theme', Cond(!exists('g:vscode'), { 'tag': 'v0.0.7' })
|
Plug 'projekt0n/github-nvim-theme', Cond(!exists('g:vscode'), { 'tag': 'v0.0.7' })
|
||||||
|
|
||||||
@@ -122,7 +109,7 @@
|
|||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
" Automatically install missing plugins on startup
|
" Automatically install missing plugins at startup
|
||||||
autocmd VimEnter *
|
autocmd VimEnter *
|
||||||
\ if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
|
\ if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
|
||||||
\| PlugInstall --sync | q
|
\| PlugInstall --sync | q
|
||||||
@@ -144,7 +131,7 @@ function! HasPlug(plug_name, ...)
|
|||||||
return v:false
|
return v:false
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Plugin_Preferences
|
" PLUGIN_CONFIGURATION
|
||||||
" {
|
" {
|
||||||
" Yggdroot/indentLine {
|
" Yggdroot/indentLine {
|
||||||
if HasPlug('indentLine')
|
if HasPlug('indentLine')
|
||||||
@@ -463,7 +450,7 @@ endfunction
|
|||||||
" }
|
" }
|
||||||
" }
|
" }
|
||||||
|
|
||||||
" Theme_Appearance
|
" THEME_CONFIGURATION
|
||||||
" {
|
" {
|
||||||
"
|
"
|
||||||
" debug function print out highlight group of cursor position
|
" debug function print out highlight group of cursor position
|
||||||
@@ -549,10 +536,9 @@ endfunction
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Change bottom airline/lualine theme
|
" Change bottom airline/lualine theme
|
||||||
" Currently only support airline
|
|
||||||
function! SetStatusLineTheme(theme)
|
function! SetStatusLineTheme(theme)
|
||||||
if g:vim_type == 'nvim' && g:vim_version >= 0.5
|
if g:vim_type == 'nvim' && g:vim_version >= 0.5
|
||||||
"execute('AirlineTheme ' . a:theme)
|
" lualine will change theme automatically
|
||||||
else
|
else
|
||||||
if HasPlug('vim-airline') && HasPlug('vim-airline-themes')
|
if HasPlug('vim-airline') && HasPlug('vim-airline-themes')
|
||||||
execute('AirlineTheme ' . a:theme)
|
execute('AirlineTheme ' . a:theme)
|
||||||
@@ -561,7 +547,6 @@ endfunction
|
|||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
" Fix colorscheme not working correctly under transparent background
|
" Fix colorscheme not working correctly under transparent background
|
||||||
" There is no plugin for this for nvim < 0.5 or vim without lua support
|
|
||||||
function! TransparentBackgroundFix()
|
function! TransparentBackgroundFix()
|
||||||
if !has('nvim') || g:vim_version < 0.5
|
if !has('nvim') || g:vim_version < 0.5
|
||||||
endif
|
endif
|
||||||
@@ -759,7 +744,7 @@ endfunction
|
|||||||
|
|
||||||
" }
|
" }
|
||||||
|
|
||||||
" Key_Mappings
|
" KEY_MAPS
|
||||||
" (This doesn't include plugin specific mapping.
|
" (This doesn't include plugin specific mapping.
|
||||||
" For them please check plugin Preferences)
|
" For them please check plugin Preferences)
|
||||||
" {
|
" {
|
||||||
@@ -780,22 +765,14 @@ endfunction
|
|||||||
" leader num change tab
|
" leader num change tab
|
||||||
" only for vim or nvim without lualine
|
" only for vim or nvim without lualine
|
||||||
if g:vim_type == 'vim' || (g:vim_type == 'nvim' && g:vim_version < 0.5)
|
if g:vim_type == 'vim' || (g:vim_type == 'nvim' && g:vim_version < 0.5)
|
||||||
nnoremap <silent> <nowait> <Leader>1 :call bufferline#jump(1)<CR>
|
for i in range(1, 9)
|
||||||
nnoremap <silent> <nowait> <Leader>2 :call bufferline#jump(2)<CR>
|
execute "nnoremap <silent> <nowait> <leader>" . i .
|
||||||
nnoremap <silent> <nowait> <Leader>3 :call bufferline#jump(3)<CR>
|
\ " :call bufferline#jump(" . i . ")<CR>"
|
||||||
nnoremap <silent> <nowait> <Leader>4 :call bufferline#jump(4)<CR>
|
endfor
|
||||||
nnoremap <silent> <nowait> <Leader>5 :call bufferline#jump(5)<CR>
|
for i in range(10, 20)
|
||||||
nnoremap <silent> <nowait> <Leader>6 :call bufferline#jump(6)<CR>
|
execute "nnoremap <silent> <nowait> <space>" . i .
|
||||||
nnoremap <silent> <nowait> <Leader>7 :call bufferline#jump(7)<CR>
|
\ " :call bufferline#jump(" . i . ")<CR>"
|
||||||
nnoremap <silent> <nowait> <Leader>8 :call bufferline#jump(8)<CR>
|
endfor
|
||||||
nnoremap <silent> <nowait> <Leader>9 :call bufferline#jump(9)<CR>
|
|
||||||
nnoremap <silent> <nowait> <Space>10 :call bufferline#jump(10)<CR>
|
|
||||||
nnoremap <silent> <nowait> <Space>11 :call bufferline#jump(11)<CR>
|
|
||||||
nnoremap <silent> <nowait> <Space>12 :call bufferline#jump(12)<CR>
|
|
||||||
nnoremap <silent> <nowait> <Space>13 :call bufferline#jump(13)<CR>
|
|
||||||
nnoremap <silent> <nowait> <Space>14 :call bufferline#jump(14)<CR>
|
|
||||||
nnoremap <silent> <nowait> <Space>15 :call bufferline#jump(15)<CR>
|
|
||||||
nnoremap <silent> <nowait> <Space>16 :call bufferline#jump(16)<CR>
|
|
||||||
end
|
end
|
||||||
|
|
||||||
" split window comform with other window management shortcuts
|
" split window comform with other window management shortcuts
|
||||||
@@ -809,7 +786,8 @@ endfunction
|
|||||||
execute('source ' . g:mydotfiles_directory . '/.vimrc.lua')
|
execute('source ' . g:mydotfiles_directory . '/.vimrc.lua')
|
||||||
endif
|
endif
|
||||||
"
|
"
|
||||||
" Useful_Info{
|
" OTHER_CONFIGS
|
||||||
|
" {
|
||||||
" show mapping info
|
" show mapping info
|
||||||
" :verbose map ,cf
|
" :verbose map ,cf
|
||||||
" }
|
" }
|
||||||
|
|||||||
Reference in New Issue
Block a user