mirror of
https://github.com/ksyasuda/rice.git
synced 2025-12-06 20:53:36 -08:00
updates
This commit is contained in:
@@ -62,7 +62,6 @@ call plug#begin('~/.vim/plugged')
|
||||
Plug 'tpope/vim-fugitive'
|
||||
Plug 'tpope/vim-commentary'
|
||||
Plug 'tpope/vim-surround'
|
||||
Plug 'preservim/nerdtree' | Plug 'Xuyuanp/nerdtree-git-plugin'
|
||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||
Plug 'junegunn/fzf.vim'
|
||||
Plug 'itchyny/lightline.vim'
|
||||
@@ -76,13 +75,16 @@ Plug 'ap/vim-css-color'
|
||||
Plug 'prettier/vim-prettier', { 'do': 'yarn install' }
|
||||
Plug 'sheerun/vim-polyglot'
|
||||
Plug 'maximbaz/lightline-ale'
|
||||
Plug 'liuchengxu/vim-which-key', { 'on': ['WhichKey', 'WhichKey!'] }
|
||||
Plug 'osyo-manga/vim-over'
|
||||
Plug 'mhinz/vim-startify'
|
||||
|
||||
if has('nvim')
|
||||
Plug 'akinsho/bufferline.nvim'
|
||||
Plug 'chentau/marks.nvim'
|
||||
Plug 'folke/which-key.nvim'
|
||||
Plug 'github/copilot.vim'
|
||||
Plug 'glepnir/dashboard-nvim'
|
||||
Plug 'kyazdani42/nvim-web-devicons'
|
||||
Plug 'kyazdani42/nvim-tree.lua'
|
||||
|
||||
Plug 'NTBBloodbath/doom-one.nvim'
|
||||
Plug 'Mofiqul/dracula.nvim'
|
||||
@@ -90,6 +92,9 @@ if has('nvim')
|
||||
else
|
||||
Plug 'ap/vim-buftabline'
|
||||
Plug 'ryanoasis/vim-devicons'
|
||||
Plug 'mhinz/vim-startify'
|
||||
Plug 'preservim/nerdtree' | Plug 'Xuyuanp/nerdtree-git-plugin'
|
||||
Plug 'liuchengxu/vim-which-key', { 'on': ['WhichKey', 'WhichKey!'] }
|
||||
" vim colorschemes
|
||||
Plug 'joshdick/onedark.vim'
|
||||
Plug 'kaicataldo/material.vim', { 'branch': 'main' }
|
||||
@@ -101,6 +106,10 @@ call plug#end()
|
||||
|
||||
if has('nvim')
|
||||
source ~/.config/nvim/plugins/bufferline.lua
|
||||
source ~/.config/nvim/plugins/marks.lua
|
||||
source ~/.config/nvim/plugins/whichkey.lua
|
||||
source ~/.config/nvim/plugins/dashboard-nvim.lua
|
||||
source ~/.config/nvim/plugins/nvimtree.lua
|
||||
source ~/.config/nvim/plugins/doomone.lua
|
||||
" source ~/.config/nvim/plugins/dracula.lua
|
||||
" source ~/.config/nvim/plugins/github-theme.lua
|
||||
@@ -117,6 +126,9 @@ if has('nvim')
|
||||
endfunction
|
||||
" make terminal not have line numbers
|
||||
autocmd TermOpen * setlocal nonumber norelativenumber
|
||||
else
|
||||
source ~/.vim/plugins/nerdtree.vim
|
||||
source ~/.vim/plugins/whichkey.vim
|
||||
endif
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
@@ -262,64 +274,6 @@ let g:closetag_regions = {
|
||||
let g:wakatime_PythonBinary = '/usr/bin/python' " (Default: 'python')
|
||||
let g:wakatime_OverrideCommandPrefix = '/usr/bin/wakatime' " (Default: '')
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
"NERDTREE
|
||||
"------------------------------------------------------------------------------
|
||||
|
||||
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
|
||||
let g:NERDTreeWinPos = "right" "open nerdtree on the right
|
||||
let NERDTreeShowHidden=0 "show hidden files use capital 'I' to toggle
|
||||
let g:NERDTreeWinSize=45
|
||||
"autocmd VimEnter * wincmd p "put the cursor back into the editing pane on start
|
||||
let g:NERDTreeGitStatusIndicatorMapCustom = {
|
||||
\ 'Modified' :'✹',
|
||||
\ 'Staged' :'✚',
|
||||
\ 'Untracked' :'✭',
|
||||
\ 'Renamed' :'➜',
|
||||
\ 'Unmerged' :'═',
|
||||
\ 'Deleted' :'✖',
|
||||
\ 'Dirty' :'✗',
|
||||
\ 'Ignored' :'☒',
|
||||
\ 'Clean' :'✔︎',
|
||||
\ 'Unknown' :'?',
|
||||
\ }
|
||||
let g:NERDTreeGitStatusUseNerdFonts = 1
|
||||
" If more than one window and previous buffer was NERDTree, go back to it.
|
||||
autocmd BufEnter * if bufname('#') =~# "^NERD_tree_" && winnr('$') > 1 | b# | endif
|
||||
"avoid crashes when calling vim-plug functions while the cursor is on the NERDTree window
|
||||
let g:plug_window = 'noautocmd vertical topleft new'
|
||||
" NERDTress File highlighting
|
||||
function! NERDTreeHighlightFile(extension, fg, bg, guifg, guibg)
|
||||
exec 'autocmd filetype nerdtree highlight ' . a:extension .' ctermbg='. a:bg .' ctermfg='. a:fg .' guibg='. a:guibg .' guifg='. a:guifg
|
||||
exec 'autocmd filetype nerdtree syn match ' . a:extension .' #^\s\+.*'. a:extension .'$#'
|
||||
endfunction
|
||||
"NERDTree hilight files by extension
|
||||
call NERDTreeHighlightFile('jade', 'green', 'none', 'green', '#282c34')
|
||||
call NERDTreeHighlightFile('ini', 'yellow', 'none', 'yellow', '#282c34')
|
||||
call NERDTreeHighlightFile('md', 'blue', 'none', '#3366FF', '#282c34')
|
||||
call NERDTreeHighlightFile('yml', 'yellow', 'none', 'yellow', '#282c34')
|
||||
call NERDTreeHighlightFile('config', 'yellow', 'none', 'yellow', '#282c34')
|
||||
call NERDTreeHighlightFile('conf', 'yellow', 'none', 'yellow', '#282c34')
|
||||
call NERDTreeHighlightFile('json', 'yellow', 'none', 'yellow', '#282c34')
|
||||
call NERDTreeHighlightFile('html', 'red', 'none', 'yellow', '#282c34')
|
||||
call NERDTreeHighlightFile('styl', 'cyan', 'none', 'cyan', '#282c34')
|
||||
call NERDTreeHighlightFile('css', 'cyan', 'none', 'cyan', '#282c34')
|
||||
call NERDTreeHighlightFile('coffee', 'Red', 'none', 'red', '#282c34')
|
||||
call NERDTreeHighlightFile('js', 'yellow', 'none', '#ffa500', '#282c34')
|
||||
call NERDTreeHighlightFile('jsx', 'yellow', 'none', '#ffa500', '#282c34')
|
||||
call NERDTreeHighlightFile('tsx', 'yellow', 'none', '#ffa500', '#282c34')
|
||||
call NERDTreeHighlightFile('php', 'Magenta', 'none', '#ff00ff', '#282c34')
|
||||
call NERDTreeHighlightFile('cpp', 'blue', 'none', 'blue', '#282c34')
|
||||
call NERDTreeHighlightFile('h', 'cyan', 'none', 'cyan', '#282c34')
|
||||
call NERDTreeHighlightFile('txt', 'blue', 'none', 'red', '#282c34')
|
||||
let g:NERDTreeColorMapCustom = {
|
||||
\ "Modified" : ["#528AB3", "NONE", "NONE", "NONE"],
|
||||
\ "Staged" : ["#538B54", "NONE", "NONE", "NONE"],
|
||||
\ "Untracked" : ["#BE5849", "NONE", "NONE", "NONE"],
|
||||
\ "Dirty" : ["#299999", "NONE", "NONE", "NONE"],
|
||||
\ "Clean" : ["#87939A", "NONE", "NONE", "NONE"]
|
||||
\ }
|
||||
|
||||
"------------------------------------------------------------------------------
|
||||
"PRETTIER
|
||||
"------------------------------------------------------------------------------
|
||||
@@ -595,6 +549,7 @@ let g:floaterm_width = 0.80
|
||||
let g:floaterm_height = 0.88
|
||||
let g:floaterm_wintype = 'float'
|
||||
let g:floaterm_position = 'center'
|
||||
let g:floaterm_opener = 'edit'
|
||||
|
||||
let g:floaterm_autoclose = 1
|
||||
" let g:floaterm_autohide = 2
|
||||
@@ -619,12 +574,9 @@ let g:maplocalleader = ','
|
||||
" imap <TAB> <C-N>
|
||||
nmap <F4> :set paste!<Bar>set paste?<CR>
|
||||
nmap <F5> :!
|
||||
nmap <silent> <leader> :<c-u>WhichKey '<Space>'<CR>
|
||||
nmap <silent> <localleader> :<c-u>WhichKey ','<CR>
|
||||
nmap <C-n> :NERDTreeToggle<CR>
|
||||
" nmap <C-n> :NERDTreeToggle<CR>
|
||||
nmap <C-n> :NvimTreeToggle<CR>
|
||||
" nnoremap <C-T> :wa<CR>:vertical botright term ++kill=term<CR>
|
||||
nmap <C-T> :wa<CR>:FloatermToggle floatingterm<CR>
|
||||
tnoremap <C-T> <C-\><C-n>:FloatermToggle floatingterm<CR>
|
||||
nmap Q !!$SHELL<CR>
|
||||
|
||||
" reselect visual selection after indent
|
||||
@@ -664,6 +616,7 @@ nmap <leader>hk :Maps<CR>
|
||||
nmap <leader>isp :-1read $HOME/Templates/python.py<CR>4jw
|
||||
" any jump plugin
|
||||
nmap <leader>j :AnyJump<CR>
|
||||
nmap <leader>n :NvimTreeToggle<CR>
|
||||
" toggle/open
|
||||
nmap <leader>ob :FloatermNew --title=bpytop --opener=vsplit bpytop<CR>
|
||||
nmap <leader>od :FloatermNew --title=lazydocker --opener=vsplit lazydocker<CR>
|
||||
@@ -672,12 +625,18 @@ nmap <leader>oo :OverCommandLine<CR>
|
||||
nmap <leader>or :FloatermNew --title=ranger --opener=vsplit ranger --cmd="cd $PWD"<CR>
|
||||
" nmap <leader>ot :vertical botright ter ++kill=terminal ++close<CR>
|
||||
nmap <leader>ot :FloatermNew --title=floaterm --name=vsplit-term --wintype=vsplit --position=botright --width=0.5<CR>
|
||||
|
||||
" refresh nvimtree for now
|
||||
nmap <leader>r :NvimTreeRefresh<CR>
|
||||
" search
|
||||
nmap <leader>sc :nohls<Cr>
|
||||
nmap <leader>sf :Files<Cr>
|
||||
nmap <leader>sF :AllFiles<Cr>
|
||||
" toggle coc outline
|
||||
nmap <leader>to :CocOutline<CR>
|
||||
" terminal
|
||||
nmap <leader>tt :FloatermToggle vsplit-term<CR>
|
||||
nmap <C-T> :wa<CR>:FloatermToggle floatingterm<CR>
|
||||
" for toggling/hiding the vsplit-term
|
||||
tnoremap <leader>tt <C-\><C-N>:FloatermToggle vsplit-term<CR>
|
||||
tnoremap <C-T> <C-\><C-n>:FloatermToggle floatingterm<CR>
|
||||
tnoremap <Esc> <C-\><C-n>
|
||||
|
||||
Reference in New Issue
Block a user