添加maps.lua映射插件快捷键
This commit is contained in:
parent
d0d6edfe8c
commit
ba33951e86
2
init.lua
2
init.lua
|
@ -15,3 +15,5 @@ require "user.lualine"
|
|||
require "config.init"
|
||||
-- 按键映射
|
||||
require "config.vimrc"
|
||||
-- 插件按键映射
|
||||
require "config.maps"
|
||||
|
|
|
@ -6,7 +6,7 @@ vim.g.loaded_netrwPlugin = 1
|
|||
|
||||
-- Leader/local leader
|
||||
g.mapleader = [[ ]]
|
||||
g.maplocalleader = [[,]]
|
||||
g.maplocalleader = [[ ]]
|
||||
|
||||
-- Skip some remote provider loading
|
||||
g.loaded_python3_provider = 0
|
||||
|
@ -56,19 +56,6 @@ local silent = {
|
|||
|
||||
local map = vim.api.nvim_set_keymap
|
||||
|
||||
-- Save buffer
|
||||
map('i', '<c-s>', '<esc><cmd>w<cr>a', silent)
|
||||
map('n', '<leader>w', '<cmd>w<cr>', silent)
|
||||
|
||||
-- 退出、关闭缓冲区等。
|
||||
map('n', '<leader>q', '<cmd>qa<cr>', silent)
|
||||
map('n', '<leader>x', '<cmd>x!<cr>', silent)
|
||||
map('n', '<leader>d', '<cmd>Sayonara<cr>', {
|
||||
silent = true,
|
||||
nowait = true,
|
||||
noremap = true
|
||||
})
|
||||
|
||||
-- utf8
|
||||
vim.g.encoding = "UTF-8"
|
||||
vim.o.fileencoding = 'utf-8'
|
||||
|
@ -88,7 +75,7 @@ vim.wo.signcolumn = "yes:1"
|
|||
-- vim.wo.colorcolumn = "80"
|
||||
-- vim.opt.textwidth = 80
|
||||
|
||||
-- 预览命令的效果, 命令更改会在原位置显示
|
||||
-- 预览命令的效果, 命令更改会在原位置显示 nosplit, split
|
||||
vim.opt.inccommand = 'nosplit'
|
||||
-- 如果光标移动到括号或者大括号,则会显示与它相匹配的另外一个括号或者大括号
|
||||
vim.opt.showmatch = true
|
||||
|
|
Loading…
Reference in New Issue