112 lines
3.5 KiB
VimL
112 lines
3.5 KiB
VimL
lua require('plugins')
|
|
lua require('lsp')
|
|
|
|
nmap <silent> <c-k> :wincmd k<CR>
|
|
nmap <silent> <c-j> :wincmd j<CR>
|
|
nmap <silent> <c-h> :wincmd h<CR>
|
|
nmap <silent> <c-l> :wincmd l<CR>
|
|
|
|
inoremap <silent> <C-A-k> <Cmd>wincmd k<CR>
|
|
inoremap <silent> <C-A-j> <Cmd>wincmd j<CR>
|
|
inoremap <silent> <C-A-h> <Cmd>wincmd h<CR>
|
|
inoremap <silent> <C-A-l> <Cmd>wincmd l<CR>
|
|
|
|
tnoremap <silent> <C-A-k> <Cmd>wincmd k<CR>
|
|
tnoremap <silent> <C-A-j> <Cmd>wincmd j<CR>
|
|
tnoremap <silent> <C-A-h> <Cmd>wincmd h<CR>
|
|
tnoremap <silent> <C-A-l> <Cmd>wincmd l<CR>
|
|
|
|
" Terminal
|
|
command Terminal below 15sp term://$SHELL |startinsert
|
|
autocmd TermOpen * set nonu
|
|
autocmd BufEnter term://* startinsert
|
|
autocmd BufLeave term://* stopinsert
|
|
|
|
nnoremap <silent> <C-A-t> <Cmd>Terminal<CR>
|
|
|
|
" Move to previous/next
|
|
nnoremap <silent> <A-,> <Cmd>BufferPrevious<CR>
|
|
nnoremap <silent> <A-.> <Cmd>BufferNext<CR>
|
|
" Re-order to previous/next
|
|
nnoremap <silent> <A-<> <Cmd>BufferMovePrevious<CR>
|
|
nnoremap <silent> <A->> <Cmd>BufferMoveNext<CR>
|
|
nnoremap <silent> <A-1> <Cmd>BufferGoto 1<CR>
|
|
nnoremap <silent> <A-2> <Cmd>BufferGoto 2<CR>
|
|
nnoremap <silent> <A-3> <Cmd>BufferGoto 3<CR>
|
|
nnoremap <silent> <A-4> <Cmd>BufferGoto 4<CR>
|
|
nnoremap <silent> <A-5> <Cmd>BufferGoto 5<CR>
|
|
nnoremap <silent> <A-6> <Cmd>BufferGoto 6<CR>
|
|
nnoremap <silent> <A-7> <Cmd>BufferGoto 7<CR>
|
|
nnoremap <silent> <A-8> <Cmd>BufferGoto 8<CR>
|
|
nnoremap <silent> <A-9> <Cmd>BufferGoto 9<CR>
|
|
nnoremap <silent> <A-0> <Cmd>BufferLast<CR>
|
|
" Pin/unpin buffer
|
|
nnoremap <silent> <A-p> <Cmd>BufferPin<CR>
|
|
" Close buffer
|
|
nnoremap <silent> <A-c> <Cmd>BufferClose<CR>
|
|
" Wipeout buffer
|
|
" :BufferWipeout
|
|
" Close commands
|
|
" :BufferCloseAllButCurrent
|
|
" :BufferCloseAllButPinned
|
|
" :BufferCloseAllButCurrentOrPinned
|
|
" :BufferCloseBuffersLeft
|
|
" :BufferCloseBuffersRight
|
|
" Magic buffer-picking mode
|
|
nnoremap <silent> <C-p> <Cmd>BufferPick<CR>
|
|
" Sort automatically by...
|
|
nnoremap <silent> <Space>bb <Cmd>BufferOrderByBufferNumber<CR>
|
|
nnoremap <silent> <Space>bd <Cmd>BufferOrderByDirectory<CR>
|
|
nnoremap <silent> <Space>bl <Cmd>BufferOrderByLanguage<CR>
|
|
nnoremap <silent> <Space>bw <Cmd>BufferOrderByWindowNumber<CR>
|
|
|
|
:tnoremap <Esc> <C-\><C-n>
|
|
|
|
" Other:
|
|
" :BarbarEnable - enables barbar (enabled by default)
|
|
" :BarbarDisable - very bad command, should never be used
|
|
"
|
|
set background=light
|
|
set completeopt=menu,menuone,noselect
|
|
set tabstop=4
|
|
set shiftwidth=0
|
|
set number
|
|
set mouse=a
|
|
set cursorline
|
|
set noexpandtab
|
|
set clipboard+=unnamedplus
|
|
set colorcolumn=80
|
|
set textwidth=72
|
|
|
|
" set spell
|
|
" set spelllang=en_us
|
|
|
|
colorscheme gruvbox
|
|
" hi Normal guibg=NONE ctermbg=NONE
|
|
|
|
let g:airline_theme= 'base16_gruvbox_light_soft'
|
|
let g:airline_powerline_fonts = 1
|
|
|
|
|
|
tnoremap <C-A-n> <cmd>NnnExplorer<CR>
|
|
nnoremap <C-A-n> <cmd>NnnExplorer %:p:h<CR>
|
|
tnoremap <C-A-p> <cmd>NnnPicker<CR>
|
|
nnoremap <C-A-p> <cmd>NnnPicker<CR>
|
|
|
|
" Use <Tab> and <S-Tab> to navigate through popup menu
|
|
inoremap <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
|
inoremap <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
|
|
|
|
autocmd FileType markdown setlocal spell
|
|
|
|
" Neovide
|
|
let g:neovide_transparency = 0.0
|
|
let g:transparency = 0.90
|
|
let g:neovide_background_color = '#f2e5bc'.printf('%x', float2nr(255 * g:transparency))
|
|
let g:neovide_input_macos_alt_is_meta = v:true
|
|
|
|
let g:neovide_floating_blur_amount_x = 2.0
|
|
let g:neovide_floating_blur_amount_y = 2.0
|
|
let g:neovide_floating_opacity = 60
|
|
|