fix(nvim): key mapping

This commit is contained in:
2021-03-18 14:09:03 +08:00
parent 508529e4ce
commit 68c1545630
4 changed files with 22 additions and 2 deletions
+15
View File
@@ -12,3 +12,18 @@ map("", "<leader>c", '"+y')
-- open terminals -- open terminals
map("n", "<C-b>" , [[<Cmd> vnew term://bash<CR>]] , opt) -- split term vertically , over the right map("n", "<C-b>" , [[<Cmd> vnew term://bash<CR>]] , opt) -- split term vertically , over the right
map("n", "<C-x>" , [[<Cmd> split term://bash | resize 10 <CR>]] , opt) -- split term vertically , over the right map("n", "<C-x>" , [[<Cmd> split term://bash | resize 10 <CR>]] , opt) -- split term vertically , over the right
-- file
map("n","<leader>fs",[[<Cmd> w<CR>]])
-- buffer
map("n", "<leader>bn",[[<Cmd> bnext<CR>]])
map("n", "<leader>bp",[[<Cmd> bprev<CR>]])
map("n", "<leader>bd",[[<Cmd> w\|bd<cr><CR>]])
-- search
map("n","<leader>sc",[[<Cmd> nohlsearch<CR>]])
-- vim self
map("n","<leader>qq",[[<Cmd> qa<CR>]])
map("n","<leader>qr",[[<Cmd> luafile $MYVIMRC<CR>]])
+1 -1
View File
@@ -14,7 +14,7 @@ return require("packer").startup(
use {"nvim-treesitter/nvim-treesitter"} use {"nvim-treesitter/nvim-treesitter"}
use {"chriskempson/base16-vim"} use {"chriskempson/base16-vim"}
use {"norcalli/nvim-colorizer.lua"} use {"norcalli/nvim-colorizer.lua"}
use { 'Yggdroot/indentLine'} use {"Yggdroot/indentLine"}
use {"ryanoasis/vim-devicons"} use {"ryanoasis/vim-devicons"}
use {"sbdchd/neoformat"} use {"sbdchd/neoformat"}
use {"neovim/nvim-lspconfig"} use {"neovim/nvim-lspconfig"}
+1
View File
@@ -62,6 +62,7 @@ vim.g.mapleader = " "
-- mappings -- mappings
vim.api.nvim_set_keymap("n", "<Leader>ff", [[<Cmd>lua require('telescope.builtin').find_files()<CR>]], opt) vim.api.nvim_set_keymap("n", "<Leader>ff", [[<Cmd>lua require('telescope.builtin').find_files()<CR>]], opt)
vim.api.nvim_set_keymap("n", "<C-p>", [[<Cmd>lua require('telescope.builtin').find_files()<CR>]], opt)
vim.api.nvim_set_keymap( vim.api.nvim_set_keymap(
"n", "n",
"<Leader>fp", "<Leader>fp",
+5 -1
View File
@@ -24,8 +24,12 @@ opt("o", "updatetime", 250) -- update interval for gitsigns
opt("o", "clipboard", "unnamedplus") opt("o", "clipboard", "unnamedplus")
-- for indenline -- for indenline
local indent = 4
opt("b", "expandtab", true ) opt("b", "expandtab", true )
opt("b", "shiftwidth", 2 ) opt("b", "shiftwidth", indent )
opt('b', 'tabstop', indent) -- Number of spaces tabs count for
opt('o', 'completeopt', 'menuone,noinsert,noselect') -- Completion options (for deoplete)
local M = {} local M = {}