improve structure
This commit is contained in:
@@ -288,30 +288,11 @@
|
|||||||
" Fix file type error for typescript
|
" Fix file type error for typescript
|
||||||
autocmd BufNewFile,BufRead *.ts set filetype=typescript
|
autocmd BufNewFile,BufRead *.ts set filetype=typescript
|
||||||
|
|
||||||
" leader s change occurence
|
|
||||||
:nnoremap <Leader>s :%s/\<<C-r><C-w>\>/
|
|
||||||
" leader num change tab
|
|
||||||
nnoremap <Leader>1 :b1<CR>
|
|
||||||
nnoremap <Leader>2 :b2<CR>
|
|
||||||
nnoremap <Leader>3 :b3<CR>
|
|
||||||
nnoremap <Leader>4 :b4<CR>
|
|
||||||
nnoremap <Leader>5 :b5<CR>
|
|
||||||
nnoremap <Leader>6 :b6<CR>
|
|
||||||
nnoremap <Leader>7 :b7<CR>
|
|
||||||
nnoremap <Leader>8 :b8<CR>
|
|
||||||
nnoremap <Leader>9 :b9<CR>
|
|
||||||
"let c = 0
|
|
||||||
"while c <= 100
|
|
||||||
" execute 'nnoremap <Leader>'.c ':b'.c.'<CR>'
|
|
||||||
" let c += 1
|
|
||||||
"endwhile
|
|
||||||
|
|
||||||
|
|
||||||
" These are to cancel the default behavior of d, D, c, C
|
" These are to cancel the default behavior of d, D, c, C
|
||||||
" to put the text they delete in the default register.
|
" to put the text they delete in the default register.
|
||||||
" Note that this means e.g. "ad won't copy the text into
|
" Note that this means e.g. "ad won't copy the text into
|
||||||
" register a anymore. You have to explicitly yank it.
|
" register a anymore. You have to explicitly yank it.
|
||||||
"
|
|
||||||
" TIPS: you can type :registers to view value in each registers
|
" TIPS: you can type :registers to view value in each registers
|
||||||
vnoremap p "0p
|
vnoremap p "0p
|
||||||
|
|
||||||
@@ -335,10 +316,6 @@
|
|||||||
exec "set t_PE=\e[201~"
|
exec "set t_PE=\e[201~"
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" Tab navigation.
|
|
||||||
nnoremap <space>q :bprevious<CR>
|
|
||||||
nnoremap <space>e :bnext<CR>
|
|
||||||
|
|
||||||
" Use bundles config {
|
" Use bundles config {
|
||||||
if filereadable(expand("~/.vimrc.bundles"))
|
if filereadable(expand("~/.vimrc.bundles"))
|
||||||
source ~/.vimrc.bundles
|
source ~/.vimrc.bundles
|
||||||
|
|||||||
+45
-10
@@ -1,6 +1,15 @@
|
|||||||
" If anything not work as expected. Please make sure all plugins
|
" If anything not work as expected. Please make sure all plugins
|
||||||
" are installed by running:
|
" are installed by running:
|
||||||
" :PlugInstall
|
" :PlugInstall
|
||||||
|
"
|
||||||
|
" Content
|
||||||
|
" ('#' jump to the topic)
|
||||||
|
"
|
||||||
|
" Plugin_Install
|
||||||
|
" Plugin_Preferences
|
||||||
|
" Theme_Appearance
|
||||||
|
" Key_Mappings
|
||||||
|
|
||||||
|
|
||||||
" Environment {
|
" Environment {
|
||||||
|
|
||||||
@@ -8,8 +17,10 @@
|
|||||||
set nocompatible " Must be first line
|
set nocompatible " Must be first line
|
||||||
" }
|
" }
|
||||||
" }
|
" }
|
||||||
"
|
|
||||||
" Plugin directory
|
" Plugin_Install
|
||||||
|
" {
|
||||||
|
" Plugin environment
|
||||||
let config_dir = '~/.dotfiles/'
|
let config_dir = '~/.dotfiles/'
|
||||||
let plugin_dir = '~/.vim/plugged/'
|
let plugin_dir = '~/.vim/plugged/'
|
||||||
let g:vim_dir = '~/.vim/'
|
let g:vim_dir = '~/.vim/'
|
||||||
@@ -44,7 +55,6 @@
|
|||||||
|
|
||||||
" {
|
" {
|
||||||
Plug 'jiangmiao/auto-pairs'
|
Plug 'jiangmiao/auto-pairs'
|
||||||
"let g:AutoPairsFlyMode = 1
|
|
||||||
" }
|
" }
|
||||||
Plug 'mg979/vim-visual-multi'
|
Plug 'mg979/vim-visual-multi'
|
||||||
|
|
||||||
@@ -60,10 +70,7 @@
|
|||||||
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
|
||||||
endif
|
endif
|
||||||
|
|
||||||
" vim theme
|
|
||||||
" {
|
|
||||||
Plug 'NLKNguyen/papercolor-theme'
|
Plug 'NLKNguyen/papercolor-theme'
|
||||||
" }
|
|
||||||
|
|
||||||
" only work with nvim > 0.5
|
" only work with nvim > 0.5
|
||||||
" For other versions, just loading the plugin may
|
" For other versions, just loading the plugin may
|
||||||
@@ -76,8 +83,9 @@
|
|||||||
Plug 'catppuccin/vim', { 'as': 'catppuccin' }
|
Plug 'catppuccin/vim', { 'as': 'catppuccin' }
|
||||||
|
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
" }
|
||||||
|
|
||||||
" Plugin Preferences
|
" Plugin_Preferences
|
||||||
" {
|
" {
|
||||||
" godlygeek/tabular {
|
" godlygeek/tabular {
|
||||||
if isdirectory(expand(plugin_dir . "/tabular"))
|
if isdirectory(expand(plugin_dir . "/tabular"))
|
||||||
@@ -166,7 +174,7 @@
|
|||||||
" }
|
" }
|
||||||
" }
|
" }
|
||||||
|
|
||||||
" THEME APPEARANCE
|
" Theme_Appearance
|
||||||
" {
|
" {
|
||||||
" dark or light
|
" dark or light
|
||||||
if filereadable(expand(g:vim_dir . '.light_theme.signal'))
|
if filereadable(expand(g:vim_dir . '.light_theme.signal'))
|
||||||
@@ -264,7 +272,6 @@
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
noremap <leader>tb :call ToggleTransparent()<CR>
|
|
||||||
|
|
||||||
" {
|
" {
|
||||||
" nvim only theme
|
" nvim only theme
|
||||||
@@ -347,6 +354,34 @@
|
|||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
noremap <leader>bg :call ToggleBG()<CR>
|
|
||||||
" }
|
" }
|
||||||
|
|
||||||
|
" Key_Mappings
|
||||||
|
" (This doesn't include plugin specific mapping.
|
||||||
|
" For them please check plugin Preferences)
|
||||||
|
" {
|
||||||
|
|
||||||
|
" Toggle dark/light theme
|
||||||
|
noremap <leader>bg :call ToggleBG()<CR>
|
||||||
|
|
||||||
|
" Toggle transparent background
|
||||||
|
noremap <leader>tb :call ToggleTransparent()<CR>
|
||||||
|
|
||||||
|
" Buffer navigation
|
||||||
|
nnoremap <space>q :bprevious<CR>
|
||||||
|
nnoremap <space>e :bnext<CR>
|
||||||
|
|
||||||
|
" leader s change all occurence
|
||||||
|
:nnoremap <Leader>s :%s/\<<C-r><C-w>\>/
|
||||||
|
|
||||||
|
" leader num change tab
|
||||||
|
nnoremap <Leader>1 :b1<CR>
|
||||||
|
nnoremap <Leader>2 :b2<CR>
|
||||||
|
nnoremap <Leader>3 :b3<CR>
|
||||||
|
nnoremap <Leader>4 :b4<CR>
|
||||||
|
nnoremap <Leader>5 :b5<CR>
|
||||||
|
nnoremap <Leader>6 :b6<CR>
|
||||||
|
nnoremap <Leader>7 :b7<CR>
|
||||||
|
nnoremap <Leader>8 :b8<CR>
|
||||||
|
nnoremap <Leader>9 :b9<CR>
|
||||||
|
" }
|
||||||
|
|||||||
Reference in New Issue
Block a user