Git Product home page Git Product logo

lin.vim's Introduction

lin.vim : Lin Rongbin's (Neo)vim Distribution

Deprecated: Leave vim behind, switch to neovim only for its best performance, editing experience and powerful community. Please use lin.nvim for neovim, it's the next generation of my neovim distribution. This project is no long actively developed, while PR and bug fix is still welcomed.

lin.vim is a highly configured vim/neovim distribution integrated tons of utilities for development, inspired by spf13-vim.

Table of Contents

Introduction

Aim to be out of box, IDE-like editing experience, high performance, light weight and friendly to both vim and neovim users. Focus on and only on editing, no compile/package/debug.

Solve below issues:

  • Time-costing vim configurations - All behaviors follow community's best practice and most popular editors (just like vscode).
  • Lack of IDE-like editing features - Coc.nvim and a bunch of language servers and extensions are embeded.
  • Don't know how to choose/configure/manage vim plugins - All plugins are carefully selected and well cooperated for best performance and user experience, cover most modern editor features (again, just like vscode).
  • Duplicate installation on different OS and machines - All done by one-line command (not on Windows for now), all installations behave the same (the only difference is use command-key on macOS instead of alt-key on Windows/Linux).
  • Naive UI - Pretty colorschemes, icons, opened tabs, file explorer, file status integrated.

Screenshots

edit-markdown.png
Simple but pretty UI

python3-complete.png
Code complete for python3

outline-terminal.jpg
Outlines and Terminal

fast-cursor-movement.png
Fast cursor movement

search-text.png
Search text

search-files.png
Search files

markdown-preview.png
Markdown preview

Feature

  • One-line command installation (not on windows for now).
  • Work on multiple OS platforms:
    • Windows.
    • macOS.
    • Linux (Ubuntu/Debian/Fedora/Manjaro).
  • Support both vim and neovim, neovim 0.7+ is strongly recommended for best performance and experience.
  • Modern editor UI:
    • File explorer.
    • Icons.
    • Color schemes randomly selected on start.
    • Status line.
    • Tab line and buffer explorer.
    • Outline/Tags.
  • IDE-like editing features supported by coc.nvim, a bunch of language servers embeded by default:
    • Code complete.
    • Diagnostic.
    • Lint.
    • Code format.
    • Jump between symbols.
    • Code Actions.
    • Code Lens.
  • Search engine supported by fzf.vim:
    • Text search.
    • File search.
    • Git search.
    • Coc.nvim integrated search.
    • Other search.
  • Other editing enhancements.
  • Custom configuration.

Installation

UNIX/Linux/MacOS

    git clone https://github.com/linrongbin16/lin.vim ~/.vim && cd ~/.vim && ./install.sh

Notice:

  1. The install.sh will automatically install below dependencies with system package manager:

  2. For now supported platforms are:

    • Debian/ubuntu based linux: use apt as software installer.
    • Fedora/centos based linux: use dnf as software installer.
    • Archlinux based linux: use pacman as software installer.
    • MacOS: use brew as software installer, please install Xcode and homebrew as pre-requirements.
    • Other *NIX systems such as gentoo, bsd are not supported yet.

Windows

  1. Install Visual Studio with below 2 components:

    • .NET Desktop Development
    • Desktop development with C++

install-windows-visual-studio2.png Select .NET and C++ components

  1. Install 64-bit Git for Windows Setup with below 3 options:

    • In the Select Components step, select Associate .sh files to be run with Bash.
    • In the Adjusting your PATH environment step, select Use Git and optional Unix tools from the Command Prompt.
    • In the Configuring the terminal emulator to use with Git Bash step, select Use Windows's default console window. This will add git.exe and linux builtin commands (such as bash.exe, cp.exe, mv.exe, cd.exe, ls.exe, etc) to $env:Path.

install-windows-git1.png
Treat .sh files as bash script

install-windows-git2.png
Enable both git and linux builtin commands

install-windows-git3.png
Add git and linux commands to environment path

  1. Install other 64-bit dependencies:

    • vim-win32-installer (gvim_{x.y.z}_x64.exe): add gvim.exe to $env:Path
    • neovim (nvim-win64.msi): add nvim.exe to $env:Path
    • cmake (cmake-{x.y.z}-windows-x86_64.msi): add cmake.exe to $env:Path
    • make-for-win32 (make-{x.y}-bin.zip): add make.exeto$env:Path
    • python3 (python-{x.y.z}-amd64.exe): manually copy python.exe to python3.exe, then add python3.exe to $env:Path (Since windows python3 installer only provide python.exe).
    • rust (rustup-init.exe (64-bit)): add rustc.exe, cargo.exe to $env:Path
    • golang (go{x.y.z}.windows-amd64.msi): add go.exe to $env:Path
    • nodejs (node-v{x.y.z}-x64.msi): add node.exe, npm.exe to $env:Path
    • universal-ctags (ctags-p{x.y.d.z}-x64.zip): add ctags.exe, readtags.exe to $env:Path
  2. Install Hack NFM.

  3. Run powershell commands as administrator:

    git clone https://github.com/linrongbin16/lin.vim $env:UserProfile\.vim && cd $env:UserProfile\.vim && .\install.ps1

Notice:

  1. If you are using WSL, C:\Windows\System32\bash.exe could lead you to WSL instead of the bash.exe from Git for Windows. Make sure git path is ahead of C:\Windows\System32, so git bash will be first detected (wsl.exe could connect to WSL as well so no need to worry about losing C:\Windows\System32\bash.exe).

install-windows-git-path.png
Move git path ahead of C:\Windows\System32

  1. Git for Windows provide an old-version vim.exe, make sure gvim.exe (from vim-win32-installer) path is ahead of git, so vim.exe from vim-win32-installer will be first detected. You could also only use gvim.exe to avoid the old-version vim.

install-windows-gvim-path.png
Move gvim path ahead of git

  1. Python3 version must be compatible with gvim's libpython3.lib, or python3 will not be loaded correctly. Please use gvim --version to find its libpython3.lib version.

install-windows-gvim-libpython3.png
Find libpython3.lib version at bottom

  1. Disable Windows App alias python.exe or python3.exe, this could lead you to the wrong python from windows store.

install-windows-app-alias.png
Disable python.exe and python3.exe

More Options

The install.sh (and install.ps1) provide 3 installation modes:

  • Full mode (default mode): with ./install.sh, it install all features for best user experience, which consumes unignorable CPU, memory, disk and graphics.
  • Limit mode: for low performance devices (such as old PC). With ./install.sh --limit, it disable extra highlights, colorschemes, language support and editing enhancements.
  • Basic mode: for extremely restricted environment (such as production environment), which has limited network access or user authentication. With ./install.sh --basic, it only install pure vim configurations, without any third party softwares or vim plugins.

And more options:

  • --static-color=TEXT: make colorscheme static, instead of random selection on startup. For example: --static-color=darkblue.
  • --disable-color: disable extra colorschemes, and random selection on startup.
  • --disable-highlight: disable extra highlights. Such as RGB and same word mark under cursor, etc.
  • --disable-language: disable language support. Such as auto complete and language servers, etc.
  • --disable-editing: disable editing enhancements. Such as easy comment, cursor motion, etc.
  • --disable-plugin=TEXT: disable specific vim plugin in format 'organization/repository', this is a multiple option. For example: --disable-plugin=RRethy/vim-hexokinase --disable-plugin=alvan/vim-closetag.
  • --disable-vim: don't install .vimrc file for vim, could use neovim only.
  • --disable-neovim: don't install nvim/init.vim file for neovim, could use vim only.

Notice:

  • In full mode, you could use '--disable-xxx' options to disable some specific features.
  • Option '--disable-highlight --disable-color --disable-language --disable-editing' is equivalent to '--limit'.

The install.ps1 especially provide two more options for Windows:

  • --depends=TEXT: download and install specific dependency in 3rd step of windows installation. Use --depends=all to run for all dependencies. For example: --depends=vim, --depends=universal-ctags.
  • --nerdfont=TEXT: download specific nerd font. For example: --nerdfont=Hack, --nerdfont=SourceCodePro.

Use a package manager (such as chocolatey and scoop) could be a better choice, just make sure they're available in $env:Path.

Upgrade

For distribution, please re-install by:

    cd ~/.vim
    git pull origin master
    ./install.sh

For vim plugins, please open (neo)vim and update by:

    :PlugUpdate!

User Guide

In this section, vim editing mode are specified with:

  • 🇳 - Normal mode.
  • 🇻 - Visual mode.
  • 🇮 - Insert mode.

Meta-key (M), alt-key (A) on Windows/Linux, and command-key (D) on macOS are collectively refered as:

  • M

Global Key Mappings

Hot Keys

  • F1 🇳 - Toggle file explorer, see Simple but pretty UI.
  • F2 🇳 - Toggle undo tree.
  • F3 🇳 - Toggle outline/tags, see Outlines and Terminal.
  • F4 🇳 - Switch between C/C++ headers and sources.
  • F7 🇳 - Toggle git blame info on current line.
  • F8 🇳 - Open markdown preview.
  • F9 🇳 - Toggle terminal.
  • F10 🇳 - Toggle buffers explorer.

Control/Command+? Keys

Control+? keys are configured following most editors' behaviour under windows:

  • <C-a> 🇳 🇻 🇮 - Select all.
  • <C-c> 🇳 🇻 🇮 - Copy to clipboard.
  • <C-x> 🇳 🇻 🇮 - Cut to clipboard.
  • <C-v> 🇳 🇻 🇮 - Paste from clipboard.
  • <C-s> 🇳 🇻 🇮 - Save file.
  • <C-y> 🇳 🇻 🇮 - Redo.
  • <C-z> 🇳 🇻 🇮 - Undo.
  • <C-q> 🇳 - Turn into visual block mode, same as vim's original ctrl+v (since we remapped it to paste).

Additionally for macOS, command+? keys are configured following the same behaviour (control+? keys are also enabled):

  • <D-a> 🇳 🇻 🇮 - Same as <C-a>.
  • <D-c> 🇳 🇻 🇮 - Same as <C-c>.
  • <D-x> 🇳 🇻 🇮 - Same as <C-x>.
  • <D-v> 🇳 🇻 🇮 - Same as <C-v>.
  • <D-s> 🇳 🇻 🇮 - Same as <C-s>.
  • <D-y> 🇳 🇻 🇮 - Same as <C-y>.
  • <D-z> 🇳 🇻 🇮 - Same as <C-z>.

Copy/paste across different vim instances through remote ssh could be difficult, so introduce two shortcuts using local cache:

  • <Leader>y 🇻 - Copy visual selected text to cache.
  • <Leader>p 🇳 - Paste from cache to current cursor.

You could configure all global key mappings in ~/.vim/settings.vim.

UI

File Explorer

File explorer is support by fern.vim (switched to nvim-tree.lua on neovim 0.7+).

Navigation:

  • h 🇳 - Collapse directory.
  • l 🇳 - Expand directory or open file.
  • <CR> 🇳 - Cd into directory.
  • <BS> 🇳 - Go to upper directory and leave directory.
  • e 🇳 - Open file in split.
  • E 🇳 - Open file in vsplit.
  • t 🇳 - Open file in new tab.

Create/rename/delete:

  • N/a 🇳 - Create new file. Notice a is not working on fern.vim, since it's forcely mapped to <Plug>(fern-action-choice) instead of <Plug>(fern-action-new-file).
  • A 🇳 - Create new directory. Notice nvim-tree.lua need an additional slash / (or \) after directory name (see: nvim-tree.lua - Tips & tricks), while fern.vim just need directory name itself.
  • m/r 🇳 - Move or rename file/directory.
  • d 🇳 - Trash file/directory to system trash-bin, only for windows/macOS.
  • D 🇳 - Delete file/directory, usually rm.

Copy/paste/cut:

  • C 🇳 - Copy file/directory into an internal clipboard, just like in Windows ctrl+c.
  • X 🇳 - Cut file/directory into an internal clipboard, just like in Windows ctrl+x.
  • V 🇳 - Paste file/directory from an internal clipboard to current directory, just like in Windows ctrl+v.

Adjust explorer width:

  • <M-.>/<M-Right>/<C-.>/<C-Right> 🇳 - Make explorer bigger size.
  • <M-,>/<M-Left>/<C-,>/<C-Left> 🇳 - Make explorer smaller size.

Other:

  • R 🇳 - Refresh file explorer.
  • s 🇳 - Open file in system file manager(such as Finder in macOS).
  • ? 🇳 - Toggle help.

For neovim 0.7+ only:

  • I 🇳 - Toggle file info.
  • H 🇳 - Toggle hidden dot files.
  • < 🇳 - Goto previous(up) sibling.
  • > 🇳 - Goto next(down) sibling.
  • K 🇳 - Goto first(top) sibling.
  • J 🇳 - Goto last(bottom) sibling.
  • P 🇳 - Goto parent(upper) directory.
  • y 🇳 - Copy file name as literal.
  • Y 🇳 - Copy absolute file path as literal.
  • ]c 🇳 - Goto next(down) git chunk.
  • [c 🇳 - Goto previous(up) git chunk.

You could editing ~/.vim/repository/lambdalisue/fern.vim.vim (or ~/.vim/repository/kyazdani42/nvim-tree.lua.vim) to customize key mappings. Please refer to fern.vim - wiki - Mappings (or :help nvim-tree-mappings) for more information.

Tabline

Notice that on different platforms,terminals and GUI clients, some ctrl/meta+keys could been overwritten. So introduced several ways of mappings to make sure for the availibility.

  • <Leader>bn/<M-.>/<C-.>/<M-Right>/<C-Right> 🇳 - Go to next(right) buffer.
  • <Leader>bp/<M-,>/<C-,>/<M-Left>/<C-Left> 🇳 - Go to previous(left) buffer.
  • <Leader>bd 🇳 - Close current buffer without closing vim window.

Navigation:

  • <M-1>/<C-1> 🇳 - Go to buffer-1.
  • <M-2>/<C-2> 🇳 - Go to buffer-2.
  • <M-3>/<C-3> 🇳 - Go to buffer-3.
  • <M-4>/<C-4> 🇳 - Go to buffer-4.
  • <M-5>/<C-5> 🇳 - Go to buffer-5.
  • <M-6>/<C-6> 🇳 - Go to buffer-6.
  • <M-7>/<C-7> 🇳 - Go to buffer-7.
  • <M-8>/<C-8> 🇳 - Go to buffer-8.
  • <M-9>/<C-9> 🇳 - Go to buffer-9.
  • <M-0>/<C-0> 🇳 - Go to buffer-10 (or the last buffer on neovim 0.7+).

For neovim 0.7+ only:

  • <M-S-Right>/<C-S-Right> 🇳 - Re-order(move) current buffer to next(right) position.
  • <M-S-Left>/<C-S-Left> 🇳 - Re-order(move) current buffer to previous(left) position.
  • <LeftMouse> 🇳 - Go to target buffer.
  • <MiddleMouse> 🇳 - Close target buffer.

Support by vim-buffet (switched to barbar.nvim on neovim 0.5+).

Font

By default Hack Nerd Font Mono is enabled. Please install other nerd fonts and edit ~/.vim/settings.vim to customize fonts.

IDE-like Editing

Code Complete

  • <C-n>/<Down> 🇮 - Navigate to next suggestion.
  • <C-p>/<Up> 🇮 - Navigate to previous suggestion.
  • <TAB>/<CR> 🇮 - Confirm current suggestion.
  • <ESC>/<C-[> 🇮 - Close suggestion.
  • <C-f> 🇮 - Navigate to next(right) snippet placeholder.
  • <C-b> 🇮 - Navigate to previous(left) snippet placeholder.

Jumps

  • [d 🇳 - Go to previous(up) diagnostic location.
  • ]d 🇳 - Go to next(down) diagnostic location.
  • gd 🇳 - Go to definition.
  • gD/gl 🇳 - Go to declaration.
  • gy/gt 🇳 - Go to type definition.
  • gi 🇳 - Go to implemention.
  • gr 🇳 - Go to references.

Symbols

  • K 🇳 - Show hover information.
  • <Leader>rs 🇳 - Rename symbol.

Code Format

  • <Leader>cf 🇳 - Format code on whole buffer in normal mode.
  • <Leader>cf 🇻 - Format selected code in visual mode.

Code Actions

  • <Leader>ca 🇳 - Run code actions under cursor in normal mode.
  • <Leader>ca 🇻 - Run code actions on selected code in visual mode.
  • <Leader>qf 🇳 - Apply quick fix for diagnostics on current line.

CodeLens

  • <Leader>cl 🇳 - Run the CodeLens on current line.

Git

  • ]c 🇳 - Go to next(down) git chunk in current buffer.
  • [c 🇳 - Go to previous(up) git chunk in current buffer.
  • <Leader>gb 🇳 - Toggle git blame info for current line (for neovim 0.5+).

Search

Search engine use fzf.vim and integrated with coc.nvim with coc-fzf. All fzf commands are configured with prefix Fzf, for example :Files are renamed to :FzfFiles, :Rg are renamed to :FzfRg.

Text Search

  • <Space>gr 🇳 - Search text by self-defined command :LinVimFzfRg.
  • <Space>gw 🇳 - Search word text under cursor by self-defined command :LinVimFzfRgCWord.
  • <Space>l 🇳 - Search lines on opened buffers by :FzfLines.
  • <Space>t 🇳 - Search tags by :FzfTags.
  • <Space>y 🇳 - Search yank history by :CocFzfList yank.
  • <Space>sh 🇳 - Search searched history by :FzfHistory/.
  • <Space>ch 🇳 - Search vim command history by :FzfHistory:.

File Search

  • <Space>f/<C-p> 🇳 - Search files by :FzfFiles.
  • <Space>b 🇳 - Search opened buffers by :FzfBuffers.
  • <Space>hf 🇳 - Search history files (v:oldfiles) and opened buffers by :FzfHistory.

Git Search

  • <Space>gc 🇳 - Search git commits by :FzfCommits.
  • <Space>gf 🇳 - Search git files rby :FzfGFile.
  • <Space>gs 🇳 - Search git status (also diff files by preview) by :FzfGFiles?.

Other Search

  • <Space>mk 🇳 - Search marks by :FzfMarks.
  • <Space>mp 🇳 - Search normal mode vim key mappings by :FzfMaps.
  • <Space>vc 🇳 - Search vim commands by :FzfCommands.
  • <Space>ht 🇳 - Search help tags by :FzfHelptags.

Coc.nvim Search

Key mappings are configured with prefix char c after <Space>.

  • <Space>cs 🇳 - Search coc symbols by :CocFzfList symbols.
  • <Space>cd 🇳 - Search coc diagnostics by :CocFzfList diagnostics.
  • <Space>co 🇳 - Search coc outlines(tags) by :CocFzfList outline.
  • <Space>cc 🇳 - Search coc commands by :CocFzfList commands.
  • <Space>cl 🇳 - Search coc location by :CocFzfList location.

Please visit fzf.vim and coc-fzf for more information.

Editing Enhancement

Easy Comment

Linewise comment:

  • gcc 🇳 - Toggle current line.
  • [count]gcc 🇳 - Toggle [count] number of lines.
  • gc{motion} 🇳 - Toggle two lines with motion(jk).
  • gc[count]{motion} 🇳 - Toggle region with [count](optional) times motion.
  • gc 🇻 - Toggle selected region in virual mode.

Blockwise comment (for neovim only):

  • gbc 🇳 - Toggle current line.
  • [count]gbc 🇳 - Toggle [count] number of lines.
  • gb{motion} 🇳 - Toggle two lines with motion.
  • gb[count]{motion} 🇳 - Toggle region with [count](optional) times motion.
  • gb 🇻 - Toggle selected region in virual mode.

Support by tcomment_vim (switched to Comment.nvim on neovim).

Cursor Motion

See Fast cursor movement.

  • <Leader>f{char} 🇳 - Move by a single {char}.
  • <Leader>s{char}{char} 🇳 - Move by two consequent {char}{char}.
  • <Leader>w 🇳 - Move by word.
  • <Leader>l 🇳 - Move by line.

Support by vim-easymotion (switched to hop.nvim on neovim 0.5+).

Word Movement

(Neo)vim word movement cannot recognize real literal word, such as camel case, mixed digits, characters, punctuations, etc. So introduce better word motions:

  • <Leader>w/<Leader>W 🇳 - word/WORD forward(right), exclusive.
  • <Leader>bb/<Leader>B 🇳 - word/WORD backward(left), exclusive.
  • <Leader>e/<Leader>E 🇳 - Forward to the end of word/WORD, inclusive.
  • <Leader>ge/<Leader>gE 🇳 - Backward to the end of word/WORD, inclusive.

Support by vim-wordmotion.

Better Repeat

Better repeat(.) operation, support by vim-repeat.

Better Surrounding(Quotes) Editing

Better surrounding(quotes) editing, support by vim-surround.

Better Matching

Better matching include HTML tags, if-endif, and other things, support by vim-matchup.

Auto Pair and Close HTML Tag

Auto pair and close html tags, support by auto-pairs (switched to nvim-autopairs on neovim 0.5+) and vim-closetag.

Customization

Please check vim entry ~/.vimrc (~/_vimrc on windows), and neovim entry ~/.config/nvim/init.vim (~/AppData/Local/nvim/init.vim on windows). They load below vim files:

  • Plugins (~/.vim/plugins.vim) - Vim plugins managed by vim-plug.
  • Standalones (~/.vim/standalone/*.vim) - Standalone vim settings.
  • Repositories (~/.vim/repository/{org}/{repo}.vim) - Vim settings for each plugin.
  • Colors (~/.vim/color-settings.vim) - Colorscheme settings.
  • Other settings (~/.vim/settings.vim) - Other settings include coc extensions, gui font, global key mappings, etc.

For basic install mode, there's only standalone vim settings, see More Options.

Appendix

Embeded Language Servers

  • C/C++
  • Python3 (Python2 is not supported)
  • Rust
  • Go
  • HTML/XML/Markdown
  • CSS/SASS/SCSS/Less
  • JSON
  • Javascript/Typescript/JSX/TSX

Color Schemes

Contribute

Please open issue/PR for anything about lin.vim.

Like lin.vim? Consider

Buy Me A Coffee

Or

wechat-pay.jpeg         alipay.jpeg

lin.vim's People

Contributors

kumailf avatar linrongbin16 avatar lokiiart avatar rlinflexport avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

lin.vim's Issues

Should lin.vim move to neovim-only, drop support for vim?

Vim 9 is released, but I don't feel like I want to use it. Actually in latest 2 years, I'm just using neovim with neovide, no more vim. Neovim 0.6+ has much better performance, and there're many new lua plugins that has cool feature and good performance.

So I want to ask you, should lin.vim move to neovim-only, drop support for vim?

不能设置en_US.UTF-8,报错

Error detected while processing /root/.vim/setting/lin-vim-standalone.vim:
line 37:
E197: Cannot set language to "en_US.UTF-8"

两个关于fzf搜索的问题

有两个比较高频的fzf搜索场景没找到用法,请教一下:

  1. 自动打开上一次搜索结果。有时搜索结果出来,处理了一个搜索项,想处理下一个时,得从头输入关键字重新搜索一遍。 LeaderF插件有个recall previous result,比较方便。

  2. 对光标所在的字符串进行搜索。这个也比较高频,现在每次得手打一遍。

感谢答疑。

clangd is not found

When try it on fedora35 workstation, got error for clangd not found, and failed to auto format when save file.
Found it need install clang-extra-tools.
建议在install/fedora.sh里面添加安装语句.

Unknown function: ShowDocumentation

更新最新的版本后,shift+K,报告错误: Unknown function: ShowDocumentation。临时按以下修改后能正常工作。

“nnoremap K :call ShowDocumentation()
nnoremap K :call CocActionAsync('doHover')

如何关闭自动format?

在保存文件的时候会自动的format代码格式,
不过用于已经存在的项目上的时候,一些固定格式被改掉了,就显得很奇怪,所以想请教下这个设置怎么改。

Install and execute errors on macos

Hello,我使用./install.sh安装lin.vim时出现了这个错误

Error detected while processing /Users/bytedance/.vimrc[147]../Users/bytedance/.vim/settings.vim:
line 58:
E484: Can't open file /opt/homebrew/Cellar/macvim/9.0.1897/MacVim.app/Contents/Resources/vim/runtime/macmap.vim

我没有管这个报错,但是在后续使用 vim 时出现了一些问题,我不确定是不是安装没有执行完成的问题:
通过space + gc查看git commits, 选中某个特定的commit后回车后报错:
Snipaste_2024-01-27_01-17-24
期待作者的解答

NERDTree图标显示不出来,但字体已安装(ubuntu18,vim8.2)

图标显示不出来(显示成了小方块之类的乱码),希望给点debug思路!
字体已安装的查询信息如下:

> fc-list | grep "Hack"
/root/.local/share/fonts/Hack Regular Nerd Font Complete Mono Windows Compatible.ttf: Hack NF:style=Regular
/root/.local/share/fonts/Hack Bold Italic Nerd Font Complete Windows Compatible.ttf: Hack NF:style=Bold Italic
/root/.local/share/fonts/Hack Regular Nerd Font Complete.ttf: Hack Nerd Font:style=Regular
/root/.local/share/fonts/Hack Bold Nerd Font Complete.ttf: Hack Nerd Font:style=Bold
/root/.local/share/fonts/Hack Bold Italic Nerd Font Complete.ttf: Hack Nerd Font:style=Bold Italic
/root/.local/share/fonts/Hack Italic Nerd Font Complete Mono.ttf: Hack Nerd Font Mono:style=Italic
/root/.local/share/fonts/Hack Regular Nerd Font Complete Windows Compatible.ttf: Hack NF:style=Regular
/root/.local/share/fonts/Hack Bold Nerd Font Complete Mono Windows Compatible.ttf: Hack NF:style=Bold
/root/.local/share/fonts/Hack Italic Nerd Font Complete Windows Compatible.ttf: Hack NF:style=Italic
/root/.local/share/fonts/Hack Bold Nerd Font Complete Mono.ttf: Hack Nerd Font Mono:style=Bold
/root/.local/share/fonts/Hack Italic Nerd Font Complete Mono Windows Compatible.ttf: Hack NF:style=Italic
/root/.local/share/fonts/Hack Bold Italic Nerd Font Complete Mono.ttf: Hack Nerd Font Mono:style=Bold Italic
/root/.local/share/fonts/Hack Bold Nerd Font Complete Windows Compatible.ttf: Hack NF:style=Bold
/root/.local/share/fonts/Hack Bold Italic Nerd Font Complete Mono Windows Compatible.ttf: Hack NF:style=Bold Italic
/root/.local/share/fonts/Hack Regular Nerd Font Complete Mono.ttf: Hack Nerd Font Mono:style=Regular
/root/.local/share/fonts/Hack Italic Nerd Font Complete.ttf: Hack Nerd Font:style=Italic

nerdtree自动关闭和自动退出focus

Hi,

nerdtree的设置可以改善一下?

  1. 只剩一个NERDTree Tab时自动退出
  2. 打开一个文件,显示NERDTree之后,focus要回到文件

user_setting里有一些设置,不过没有达到上面的效果,参照NERDTree github上的指示,可以使用下面两个设置
" Close the tab if NERDTree is the only window remaining in it.
autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
" Start NERDTree. If a file is specified, move the cursor to its window.
autocmd VimEnter * NERDTree | if argc() > 0 || exists("s:std_in") | wincmd p | endif

不过也不确定跟已经有的设置是否有冲突,放在后面是达到预期效果了.

Best wishes,

Error detected while processing CursorHold Auto commands for "*"

您好,我按照GitHub上的命令直接安装了lin.vim,但是当我打开任意一个文件夹时,得到了如标题的错误

Error detected while processing CursorHold Auto commands for "*"
E117: Unknown function: CocActionAsync

我ubuntu的版本是16.04,vim的版本是7.4,这个机器以前没有安装过vim相关的配置,应该不存在干扰相关的问题。
请问如何解决该错误呢?

这个插件会在zshrc中source一个新的配置文件,但是我本来有用zsh,这个配置文件和我现有的有冲突,所以我删除了在zshrc文件中添加的“souce ~/.linvimrc”。不知道能否在默认安装的时候,选择是否修改zsh文件呢?

E484: 无法打开文件 /Users/xiaowangzi/.vim/vim-plug.vim

你好,谢谢你的分享,我在安装时遇到了以下的问题,我不知道该怎么解决,希望你能够为我解答一下。第一次提issues,不知道需要展示一些什么信息,以下是你可能需要的信息:
截屏2021-11-12 下午6 37 46

截屏2021-11-12 下午6 33 32

Error while using nvim on windows

Error

Every time i open nvim,there exists a couple of similar errors:

Error detected while processing C:\Users<MyUserName>/.vim/setting/nvim-lualine/lualine.nvim.vim:
E5108: Error executing lua vim/_init_packages.lua:24: cannot open C:\Users<MyUserName>.vim\plugged\lualine.nvim/lua/lualine.lua: No such file or directory
stack traceback:
[C]: in function 'error'
vim/_init_packages.lua:24: in function <vim/_init_packages.lua:18>
[C]: in function 'require'
[string ":lua"]:44: in main chunk

Not only can't this plugin load,other plugins only available at Neovim 0.7.0 also shows the same error
i don't need to show every error,they are exactly the same except plugin name

My try

I've tried to reinstall everything correlated,but the error remains the same.
I've also tried to check the encoding.It didn't help.
Note:every file path is correct and can be open in any terminal
I don't know why it can't be find in lua.Maybe it's caused by permissions,but i don't know how to fix it.

Tips

I've tried it on linux.Everything is ok.
So it is about windows and lua.

markdown preview

Hi

I am new to lin vim , just want to give it a quick try , i press FN + 8 and expect to see some markdown preview panel , but it doesn't work for me , I am using MacBook Pro.

Can you pls take a look?

请教个问题

zhihu上拜读了你的文章,来学习一下你的配置 :)
现在有个小问题想请教:
win7系统上总是不显示nerd字体图标,我用的字体和你相同,是nerd-hack字体,不知你是怎么解决的?在arch上相同配置可以正常显示。 主要是那个nerdtree上的文件类型图标。

[Question] Can we install only for vim or neovim?

Thanks for this distribution.

For me, I want to use Neovim with my own configuration. And use lin.vim in Vim. I want to know whether the installation support one of Neovim and Vim, instead both of them.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.