localstatus, nvim_tree =pcall(require,"nvim-tree") ifnotstatusthen vim.notify("没有找到 nvim-tree") return end 这样在加载不到 nvim-tree 的时候,就会通过vim.notify报出来。 剩下的就是配置我们的 nvim-tree 了。 nvim_tree.setup({ sort_by ="case_sensitive", -- 是否显示 git 状态 git...
nvim-tree.nvim 主页有更多详细设置选项介绍 打开init.vim,增加 " 插件配置 lua require('plugin-config/nvim-tree') :wq 保存退出,重新打开,运行 :NvimTreeToggle 如图: 再次运行 :NvimTreeToggle 即可关闭 配置快捷键 打开/lua/keybindings.lua 增加 -- nvimTree map('n', '<A-m>', ':NvimTree...
:NvimTreeToggle打开或关闭树。采用可选的路径参数。 :NvimTreeFocus打开关闭的树,然后将注意力集中在树上。 :NvimTreeFindFile在当前缓冲区的树中移动光标,如果需要打开文件夹。 :NvimTreeCollapse递归地折叠 nvim-tree。 参考配置 Showcases 这个地址可以抄一抄现成的。 编辑于 2023-02-26 10:53・IP 属地...
例如,结合nvim-tree插件,可以在终端窗口中直接浏览文件结构: localTerminal=require('toggleterm.terminal').Terminallocalfile_explorer_term=Terminal:new({ cmd='nvimtree', hidden=true, direction='float'})-- 打开文件浏览器vim.keymap.set('n','<C-Shift-E>',function()file_explorer_term:toggle()end...
nvim-treeKeyModeAction ,+nt nnoremap nnoremap <leader>nt :NvimTreeTogglenvim-tree 可以执行常见的 创建 、删除、拷贝、剪切 文件等操作o 打开关闭文件夹 a 创建文件 r 重命名 x 剪切 c 拷贝 p 粘贴 d 删除smart-splitsKeyModeAction A-Left nmap nmap <A-Left> :lua require('smart-splits')....
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif "设置树的显示图标 letg:NERDTreeDirArrowExpandable ='+' letg:NERDTreeDirArrowCollapsible ='-' letNERDTreeIgnore = ['\.pyc$']" 过滤所有.pyc文件不显示 ...
https://github.com/nvim-tree/nvim-tree.lua#mappings 官方快捷手册 :h nvim-tree-mappings 我的配置 最新配置更新在github local M = {} function M.config() -- if nvim-tree is last buffer close it gracefully local modifiedBufs = function(bufs) local t = 0 for k,v in pairs(bufs) do ...
我的nvim设置 我的nvim设置nvim or vim配置 vim配置⽂件为~/.vimrc nvim配置⽂件为~/.config/nvim/init.vim 需要下载nodejs和nerd-font⾃体 " __ ___ __ _ ___ ___ __ __ ___ ___"| \/ \ \ / / | \ | \ \ / /_ _| \/ | _ \ / ___|...
那些技巧很有用。在多个文件中我们介绍了使用vim自带的 :grep命令进行搜索,使用quickfix 列表进行跳转,但是比起其他代码编辑器来说,总归有那么一些繁琐光是输入参数都已经很麻烦了,我想要像其他代码编辑器那样直接输入内容它就能基于工程来进行匹配。本篇文章我们将要来对它进行优化,达到这一目的。
setup({ window = { mappings = { ["P"] = { "toggle_preview", config = { use_float = false, -- use_image_nvim = true, -- title = 'Neo-tree Preview', }, }, } } }) Anything that causes Neo-tree to lose focus will end preview mode. When use_float = false, the window ...