https://www.nerdfonts.com/font-downloads Agave
neovim install
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:neovim-ppa/stable
sudo apt-get update
sudo apt-get install neovim
sudo apt-get install python-dev python-pip python3-dev python3-pip
▎ init.vim
call plug#begin()
" The default plugin directory will be as follows:
" - Vim (Linux/macOS): '~/.vim/plugged'
" - Vim (Windows): '~/vimfiles/plugged'
" - Neovim (Linux/macOS/Windows): stdpath('data') . '/plugged'
" You can specify a custom plugin directory by passing it as the argument
" - e.g. `call plug#begin('~/.vim/plugged')`
" - Avoid using standard Vim directory names like 'plugin'
" Make sure you use single quotes
" bufferline.nvim 是一个用于在 Vim 和 Neovim 中管理和切换缓冲区(buffer)的插件。它提供了一个可自定义的标签栏,用于显示打开的缓冲区,并允许您通过简单的操作在缓冲区之间进行快速切换。
Plug 'nvim-tree/nvim-web-devicons' " Recommended (for coloured icons)
Plug 'akinsho/bufferline.nvim', { 'tag': '*' }
" bufferline.nvim
Plug 'preservim/nerdtree'
Plug 'Yggdroot/LeaderF', { 'do': './install.sh' }
" Plugin outside ~/.vim/plugged with post-update hook
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
Plug 'preservim/nerdcommenter'
" Initialize plugin system
" - Automatically executes `filetype plugin indent on` and `syntax enable`.
call plug#end()
" You can revert the settings after the call like so:
" filetype indent off " Disable file-type-specific indentation
" syntax off " Disable syntax highlighting
"
" NERDTREE的快捷键
nnoremap <C-e> :NERDTreeToggle<CR>
let g:Lf_ShortcutF = '<c-p>'
" Nerd Commenter
" 创建默认映射
let g:NERDCreateDefaultMappings = 1
" 默认在注释分隔符后添加空格
let g:NERDSpaceDelims = 1
" 使用紧凑的语法来美化多行注释
let g:NERDCompactSexyComs = 1
" 将行注释分隔符左对齐,而不是按照代码缩进
let g:NERDDefaultAlign = 'left'
" 设置一个语言,以使用其替代分隔符作为默认设置
let g:NERDAltDelims_java = 1
" 添加自定义格式或覆盖默认格式
let g:NERDCustomDelimiters = { 'c': { 'left': '/**','right': '*/' } }
" 允许对空行进行注释和反注释(在注释区域进行注释时很有用)
let g:NERDCommentEmptyLines = 1
" 在反注释时去除行尾的空格
let g:NERDTrimTrailingWhitespace = 1
" 启用 NERDCommenterToggle 来检查所有选定的行是否已被注释
let g:NERDToggleCheckAllLines = 1
" 使用 `<Leader>cc` 注释选定的行或代码块
nmap <Leader>cc <Plug>NERDCommenterToggle
" 使用 `<Leader>cu` 反注释选定的行或代码块
nmap <Leader>cu <Plug>NERDCommenterToggle
" 使用 `<Leader>cs` 切换注释风格
nmap <Leader>cs <Plug>NERDCommenterCycle
" 使用 `<Leader>cm` 添加注释块
nmap <Leader>cm <Plug>NERDCommenterBlock
" 使用 `<Leader>cA` 在行尾添加注释符号
nmap <Leader>cA <Plug>NERDCommenterAppend
" 使用 `<Leader>cy` 复制注释
nmap <Leader>cy <Plug>NERDCommenterYank
" bufferline.nvim
set termguicolors
lua << EOF
require("bufferline").setup{}
EOF
" bufferline.nvim
发表回复