update
This commit is contained in:
parent
7754883738
commit
6df91b3fa5
@ -68,6 +68,8 @@ vim.cmd([[colorscheme gruvbox]])
|
||||
vim.opt.termguicolors = true
|
||||
require("bufferline").setup {
|
||||
options = {
|
||||
sort_by = 'insert_after_current',
|
||||
numbers = 'ordinal',
|
||||
-- 左侧让出 nvim-tree 的位置
|
||||
diagnostics = "nvim_lsp";
|
||||
offsets = { {
|
||||
|
||||
@ -43,7 +43,8 @@ return require('packer').startup(function()
|
||||
'nvim-telescope/telescope.nvim',
|
||||
requires = { { 'nvim-lua/plenary.nvim' } }
|
||||
}
|
||||
use {"akinsho/toggleterm.nvim"}
|
||||
|
||||
use { "akinsho/toggleterm.nvim" }
|
||||
use "Pocco81/AutoSave.nvim"
|
||||
|
||||
use 'lewis6991/gitsigns.nvim'
|
||||
end)
|
||||
|
||||
@ -3,9 +3,29 @@ require('Comment').setup()
|
||||
require('nvim-autopairs').setup()
|
||||
|
||||
require("toggleterm").setup {
|
||||
open_mapping = [[<c-\>]],
|
||||
open_mapping = [[<F1>]],
|
||||
hide_numbers = true,
|
||||
insert_mappings = true, -- whether or not the open mapping applies in insert mode
|
||||
terminal_mappings = true,
|
||||
shell = vim.o.shell,
|
||||
}
|
||||
|
||||
require("autosave").setup {
|
||||
enabled = true,
|
||||
execution_message = "AutoSave: saved at " .. vim.fn.strftime("%H:%M:%S"),
|
||||
events = { "BufLeave", "FocusLost"},
|
||||
conditions = {
|
||||
exists = true,
|
||||
filename_is_not = {},
|
||||
filetype_is_not = {},
|
||||
modifiable = true
|
||||
},
|
||||
write_all_buffers = true,
|
||||
on_off_commands = true,
|
||||
clean_command_line_interval = 0,
|
||||
debounce_delay = 135
|
||||
}
|
||||
|
||||
require('gitsigns').setup{
|
||||
|
||||
}
|
||||
|
||||
15
maps.vim
15
maps.vim
@ -37,11 +37,11 @@ nnoremap H ^
|
||||
" nmap <leader>q :wqa<CR>
|
||||
|
||||
|
||||
nmap q :bdelete<CR>
|
||||
nmap Q :q!<CR>
|
||||
nmap q :wq!<CR>
|
||||
nmap Q :wqa!<CR>
|
||||
|
||||
" 重新加载设置
|
||||
map R :source $MYVIMRC<CR>
|
||||
map R :source ~/.config/nvim/init.vim<CR>
|
||||
|
||||
|
||||
" 全选
|
||||
@ -52,6 +52,15 @@ nmap <C-a> gg<S-v>G
|
||||
" nmap <Tab> :bnext<Return>
|
||||
nmap <S-Tab> :BufferLineCyclePrev<CR>
|
||||
nmap <Tab> :BufferLineCycleNext<CR>
|
||||
nmap 1g :BufferLineGoToBuffer 1<CR>
|
||||
nmap 2g :BufferLineGoToBuffer 2<CR>
|
||||
nmap 3g :BufferLineGoToBuffer 3<CR>
|
||||
nmap 4g :BufferLineGoToBuffer 4<CR>
|
||||
nmap 5g :BufferLineGoToBuffer 5<CR>
|
||||
nmap 6g :BufferLineGoToBuffer 6<CR>
|
||||
nmap 7g :BufferLineGoToBuffer 7<CR>
|
||||
nmap 8g :BufferLineGoToBuffer 8<CR>
|
||||
nmap 9g :BufferLineGoToBuffer 9<CR>
|
||||
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user