update
This commit is contained in:
parent
7754883738
commit
6df91b3fa5
@ -68,6 +68,8 @@ vim.cmd([[colorscheme gruvbox]])
|
|||||||
vim.opt.termguicolors = true
|
vim.opt.termguicolors = true
|
||||||
require("bufferline").setup {
|
require("bufferline").setup {
|
||||||
options = {
|
options = {
|
||||||
|
sort_by = 'insert_after_current',
|
||||||
|
numbers = 'ordinal',
|
||||||
-- 左侧让出 nvim-tree 的位置
|
-- 左侧让出 nvim-tree 的位置
|
||||||
diagnostics = "nvim_lsp";
|
diagnostics = "nvim_lsp";
|
||||||
offsets = { {
|
offsets = { {
|
||||||
|
|||||||
@ -43,7 +43,8 @@ return require('packer').startup(function()
|
|||||||
'nvim-telescope/telescope.nvim',
|
'nvim-telescope/telescope.nvim',
|
||||||
requires = { { 'nvim-lua/plenary.nvim' } }
|
requires = { { 'nvim-lua/plenary.nvim' } }
|
||||||
}
|
}
|
||||||
use {"akinsho/toggleterm.nvim"}
|
use { "akinsho/toggleterm.nvim" }
|
||||||
|
use "Pocco81/AutoSave.nvim"
|
||||||
|
|
||||||
|
use 'lewis6991/gitsigns.nvim'
|
||||||
end)
|
end)
|
||||||
|
|||||||
@ -3,9 +3,29 @@ require('Comment').setup()
|
|||||||
require('nvim-autopairs').setup()
|
require('nvim-autopairs').setup()
|
||||||
|
|
||||||
require("toggleterm").setup {
|
require("toggleterm").setup {
|
||||||
open_mapping = [[<c-\>]],
|
open_mapping = [[<F1>]],
|
||||||
hide_numbers = true,
|
hide_numbers = true,
|
||||||
insert_mappings = true, -- whether or not the open mapping applies in insert mode
|
insert_mappings = true, -- whether or not the open mapping applies in insert mode
|
||||||
terminal_mappings = true,
|
terminal_mappings = true,
|
||||||
shell = vim.o.shell,
|
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 <leader>q :wqa<CR>
|
||||||
|
|
||||||
|
|
||||||
nmap q :bdelete<CR>
|
nmap q :wq!<CR>
|
||||||
nmap Q :q!<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 <Tab> :bnext<Return>
|
||||||
nmap <S-Tab> :BufferLineCyclePrev<CR>
|
nmap <S-Tab> :BufferLineCyclePrev<CR>
|
||||||
nmap <Tab> :BufferLineCycleNext<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>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -21,6 +21,9 @@ set wrap
|
|||||||
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
|
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
|
||||||
|
|
||||||
|
|
||||||
|
" 始终显示左侧符号栏 如git error信息等
|
||||||
|
set signcolumn=yes:2
|
||||||
|
|
||||||
" 在文件外修改时自动加载
|
" 在文件外修改时自动加载
|
||||||
set autoread
|
set autoread
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user