From f0a0cce850e654975d3f85b37aced318c183b401 Mon Sep 17 00:00:00 2001 From: QQ <1770362456@qq.com> Date: Sat, 28 Jan 2023 16:20:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E8=A3=85vimwiki?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lua/core/keymap.lua | 8 ++++---- lua/core/plug.lua | 18 +++++++++++++----- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/lua/core/keymap.lua b/lua/core/keymap.lua index 8324c05..308ded0 100644 --- a/lua/core/keymap.lua +++ b/lua/core/keymap.lua @@ -48,15 +48,15 @@ G.map({ {'n', 'g', ':w:LazyGit', {}}, --EasyAlign -{"v", "ga", ":EasyAlign", {silent = true}}, +{"v", "ga", ":EasyAlign", {}}, }) G.map({ -- easymotion -{'v', 'f', '(easymotion-bd-f)', {}}, -{'n', 'f', '(easymotion-overwin-f)', {}}, -{'n', 's', '(easymotion-overwin-f2)',{}}, +{'v', 's', '(easymotion-bd-f)', {}}, +{'n', 's', '(easymotion-overwin-f)', {}}, +{'n', 'f', '(easymotion-overwin-f2)',{}}, }) diff --git a/lua/core/plug.lua b/lua/core/plug.lua index 0e15e46..615a4a6 100644 --- a/lua/core/plug.lua +++ b/lua/core/plug.lua @@ -1,18 +1,21 @@ +local G = require('G') local ensure_packer = function() - local fn = vim.fn + local fn = G.fn local install_path = fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' if fn.empty(fn.glob(install_path)) > 0 then fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path}) - vim.cmd [[packadd packer.nvim]] + G.cmd [[packadd packer.nvim]] return true end return false end local packer_bootstrap = ensure_packer() -local G = require('G') return require('packer').startup(function(use) + -- 防止被自己clean + use 'wbthomason/packer.nvim' + -- 主题插件 use 'nvim-lualine/lualine.nvim' use 'morhetz/gruvbox' @@ -23,22 +26,27 @@ return require('packer').startup(function(use) -- surround 和 wildfire 配合有神奇的效果 use 'tpope/vim-surround' use 'gcmt/wildfire.vim' - -- easymotion + + -- easymotion use 'easymotion/vim-easymotion' -- 格式整理 use 'junegunn/vim-easy-align' - use 'preservim/nerdcommenter' + use 'tpope/vim-commentary' --颜色识别 use 'lilydjwg/colorizer' --markdown + use 'vimwiki/vimwiki' use 'iamcco/markdown-preview.nvim' -- git use 'kdheepak/lazygit.nvim' + -- 文件搜索 + use {'junegunn/fzf'} + end)