在 normal 模式,输入中文会直接切换到 insert 模式,并且会插入有分隔号的拼音,将原有的内容替换掉。
在 insert 模式下,输入中文的标点符号会连续出现两个标点符号。
这个老哥的解法真的有用!
设置( command + ,) -> 搜索 'editor.experimentalEditContextEnabled' -> 关闭勾选
]]>使用 lazyvim 的过程中,想搜索文件中的关键字,并快速查看完整内容,不想进入到文件中。但是预览的窗口是不自动换行的,这样预览的内容就看不全了。到底在哪里设置,才能让预览的内容自动换行呢?
请问这个预览窗口的内容如何设置自动换行呢?
还有,lazyvim 的配置一直没搞清楚,是两个地方都可以配置么? 位置 1: ~/.config/nvim/lua/plugins/xxx.lua 这里是不是可以添加新插件并配置? 位置 2:~/.local/share/nvim/lazy/LazyVim/lua/lazyvim/plugins/extras/xxx.lua 是不是下载的插件配置文件都在这里。
一直没有弄清楚这两个位置之间的关系。有没有大佬可以帮忙解释下,感谢!
]]>我加了这个配置,但是没有用
我不想将补全按钮修改为 Tab 外的按键
10gs
你会发现十秒内 vim 会卡住,打什么都没用,也不能退出。甚至 ctrl-z 都不行。
黑人?
]]>listener_add()
增量更新 vim9 缓冲区的变动外部 shell 是 cshell, 里面有很多公司工作环境配置。所以每次执行外部命令的时候 vim 都会加载一遍 cshell 的环境配置,然后导致卡顿
换 bash 是可以解决这个问题的,但公司环境都写在 cshell 里面。
有什么别的方式解决吗?
]]>配置文件是在 jdhao 大佬的配置文件基础上修改的,主要是去掉了一些自己不用的插件。在使用过程中有有几个问题,请各位大佬、V 友解惑。
1 、安装了 im-select 进行输入法自动切换,大多是情况退出插入模式可以切换为英文,回到插入模式回复为之前的输入法状态。 但是,如果:w 保存,则保持为英文输入,似乎是重置了。系统安装了 autosave 插件,不会引起输入法更改,但过一段时间似乎就会切换为英文。百思不得其解?
目前用的输入法是 Weasel ,微软输入法也用过,同样的问题。
以上问题请教各位 V 友。
]]>vi
和执行 vim.tiny
为什么是两种不同的模式? 这两个不是指向的是同一个文件 /usr/bin/vim.tiny
吗? 不同的表现在于: 以下是系统的一些信息:
root@debian:~# whereis vi vi: /usr/bin/vi /usr/share/man/man1/vi.1.gz root@debian:~# whereis vim.tiny vim.tiny: /usr/bin/vim.tiny
root@debian:~# ls -la /usr/bin/ | grep vi -rwxr-xr-x 1 root root 14560 Sep 16 2023 dbus-update-activation-environment lrwxrwxrwx 1 root root 23 May 4 2023 rview -> /etc/alternatives/rview -rwxr-xr-x 1 root root 18808 Jun 16 05:44 systemd-detect-virt lrwxrwxrwx 1 root root 20 May 4 2023 vi -> /etc/alternatives/vi lrwxrwxrwx 1 root root 22 May 4 2023 view -> /etc/alternatives/view -rwxr-xr-x 1 root root 1629584 May 4 2023 vim.tiny
root@debian:~# ls -la /etc/alternatives/ | grep vi lrwxrwxrwx 1 root root 17 May 4 2023 ex -> /usr/bin/vim.tiny lrwxrwxrwx 1 root root 28 May 4 2023 ex.1.gz -> /usr/share/man/man1/vim.1.gz lrwxrwxrwx 1 root root 31 May 4 2023 ex.da.1.gz -> /usr/share/man/da/man1/vim.1.gz lrwxrwxrwx 1 root root 31 May 4 2023 ex.de.1.gz -> /usr/share/man/de/man1/vim.1.gz lrwxrwxrwx 1 root root 31 May 4 2023 ex.fr.1.gz -> /usr/share/man/fr/man1/vim.1.gz lrwxrwxrwx 1 root root 31 May 4 2023 ex.it.1.gz -> /usr/share/man/it/man1/vim.1.gz lrwxrwxrwx 1 root root 31 May 4 2023 ex.ja.1.gz -> /usr/share/man/ja/man1/vim.1.gz lrwxrwxrwx 1 root root 31 May 4 2023 ex.pl.1.gz -> /usr/share/man/pl/man1/vim.1.gz lrwxrwxrwx 1 root root 31 May 4 2023 ex.ru.1.gz -> /usr/share/man/ru/man1/vim.1.gz lrwxrwxrwx 1 root root 31 May 4 2023 ex.tr.1.gz -> /usr/share/man/tr/man1/vim.1.gz lrwxrwxrwx 1 root root 17 May 4 2023 rview -> /usr/bin/vim.tiny lrwxrwxrwx 1 root root 17 May 4 2023 vi -> /usr/bin/vim.tiny lrwxrwxrwx 1 root root 28 May 4 2023 vi.1.gz -> /usr/share/man/man1/vim.1.gz lrwxrwxrwx 1 root root 31 May 4 2023 vi.da.1.gz -> /usr/share/man/da/man1/vim.1.gz lrwxrwxrwx 1 root root 31 May 4 2023 vi.de.1.gz -> /usr/share/man/de/man1/vim.1.gz lrwxrwxrwx 1 root root 17 May 4 2023 view -> /usr/bin/vim.tiny lrwxrwxrwx 1 root root 28 May 4 2023 view.1.gz -> /usr/share/man/man1/vim.1.gz lrwxrwxrwx 1 root root 31 May 4 2023 view.da.1.gz -> /usr/share/man/da/man1/vim.1.gz lrwxrwxrwx 1 root root 31 May 4 2023 view.de.1.gz -> /usr/share/man/de/man1/vim.1.gz lrwxrwxrwx 1 root root 31 May 4 2023 view.fr.1.gz -> /usr/share/man/fr/man1/vim.1.gz lrwxrwxrwx 1 root root 31 May 4 2023 view.it.1.gz -> /usr/share/man/it/man1/vim.1.gz lrwxrwxrwx 1 root root 31 May 4 2023 view.ja.1.gz -> /usr/share/man/ja/man1/vim.1.gz lrwxrwxrwx 1 root root 31 May 4 2023 view.pl.1.gz -> /usr/share/man/pl/man1/vim.1.gz lrwxrwxrwx 1 root root 31 May 4 2023 view.ru.1.gz -> /usr/share/man/ru/man1/vim.1.gz lrwxrwxrwx 1 root root 31 May 4 2023 view.tr.1.gz -> /usr/share/man/tr/man1/vim.1.gz lrwxrwxrwx 1 root root 31 May 4 2023 vi.fr.1.gz -> /usr/share/man/fr/man1/vim.1.gz lrwxrwxrwx 1 root root 31 May 4 2023 vi.it.1.gz -> /usr/share/man/it/man1/vim.1.gz lrwxrwxrwx 1 root root 31 May 4 2023 vi.ja.1.gz -> /usr/share/man/ja/man1/vim.1.gz lrwxrwxrwx 1 root root 31 May 4 2023 vi.pl.1.gz -> /usr/share/man/pl/man1/vim.1.gz lrwxrwxrwx 1 root root 31 May 4 2023 vi.ru.1.gz -> /usr/share/man/ru/man1/vim.1.gz lrwxrwxrwx 1 root root 31 May 4 2023 vi.tr.1.gz -> /usr/share/man/tr/man1/vim.1.gz
root@debian:~# ls -la /etc/vim total 16 drwxr-xr-x 2 root root 4096 Aug 31 05:17 . drwxr-xr-x 69 root root 4096 Aug 30 23:37 .. -rw-r--r-- 1 root root 2553 May 4 2023 vimrc -rw-r--r-- 1 root root 662 May 4 2023 vimrc.tiny
root@debian:~# cat /etc/vim/vimrc " $VIMRUNTIME refers to the versioned system directory where Vim stores its " system runtime files -- /usr/share/vim/vim<version>. " " Vim will load $VIMRUNTIME/defaults.vim if the user does not have a vimrc. " This happens after /etc/vim/vimrc(.local) are loaded, so it will override " any settings in these files. " " If you don't want that to happen, uncomment the below line to prevent " defaults.vim from being loaded. " let g:skip_defaults_vim = 1 " " If you would rather _use_ default.vim's settings, but have the system or " user vimrc override its settings, then uncomment the line below. " source $VIMRUNTIME/defaults.vim " All Debian-specific settings are defined in $VIMRUNTIME/debian.vim and " sourced by the call to :runtime you can find below. If you wish to change " any of those settings, you should do it in this file or " /etc/vim/vimrc.local, since debian.vim will be overwritten everytime an " upgrade of the vim packages is performed. It is recommended to make changes " after sourcing debian.vim so your settings take precedence. runtime! debian.vim " Uncomment the next line to make Vim more Vi-compatible " NOTE: debian.vim sets 'nocompatible'. Setting 'compatible' changes " numerous options, so any other options should be set AFTER changing " 'compatible'. "set compatible " Vim5 and later versions support syntax highlighting. Uncommenting the next " line enables syntax highlighting by default. "syntax on " If using a dark background within the editing area and syntax highlighting " turn on this option as well "set background=dark " Uncomment the following to have Vim jump to the last position when " reopening a file "au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif " Uncomment the following to have Vim load indentation rules and plugins " according to the detected filetype. "filetype plugin indent on " The following are commented out as they cause vim to behave a lot " differently from regular Vi. They are highly recommended though. "set showcmd " Show (partial) command in status line. "set showmatch " Show matching brackets. "set ignorecase " Do case insensitive matching "set smartcase " Do smart case matching "set incsearch " Incremental search "set autowrite " Automatically save before commands like :next and :make "set hidden " Hide buffers when they are abandoned "set mouse=a " Enable mouse usage (all modes) " Source a global configuration file if available if filereadable("/etc/vim/vimrc.local") source /etc/vim/vimrc.local endif
root@debian:~# cat /etc/vim//vimrc.tiny " Vim configuration file, in effect when invoked as "vi". The aim of this " configuration file is to provide a Vim environment as compatible with the " original vi as possible. Note that ~/.vimrc configuration files as other " configuration files in the runtimepath are still sourced. " When Vim is invoked differently ("vim", "view", "evim", ...) this file is " _not_ sourced; /etc/vim/vimrc and/or /etc/vim/gvimrc are. " Debian system-wide default configuration Vim set runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim90,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/after set compatible " vim: set ft=vim:
]]>最近好像不知道误触乐了 tmux 的配置还是怎么样,不能从文件内向外复制内容了。应该也跟 SSHD 配置没有关系,都是使用默认设置。
贴一下 tmux 配置和+寄存器的设置 config tmuxconfig
]]>As a bonus feature, polyglot programming is easily doable in ObjectSense. Currently vim8 and vim9 are supported, with minimal work the list can grow longer to include other languages, such as, python, ruby, lua, etc. However, as far as the operating system is concerned, only Linux and MacOS are supported at the moment. There is a user-defined command, UT, for doing unit tests of the current class. It's very convenient for accessing class data in unit tests. No need for finding workaround to the language barrier when accessing such data in white box testing. Every component can be properly tested! Pure and simple! By following a few simple conventions and thanks to the built-in modular mechanism in the language runtime, ObjectSense programs are very scalable and development work can be distributed comfortably among team members.
In a more programming linguistic point of view, ObjectSense is of imperative paradigm on the surface, but carries functional programming abilities. In the language runtime, each object has its own data and functions, there's nothing shared. An object is entirely in its own universe just like functional programming. Because the lack of time, we haven't explored such property of the language much. Hopefully, the community can shed new lights on such nice combination.
This is a strong demonstration of what VimL8 is capable of. ObjectSense takes less than 5000 lines of code for the core of the language implementation. Although it's a superset of an existing language, it's very hard to imagine using such little code for implementing a non-trivial programming language. VimL8 has a lot of unrealised potentials, people really shouldn't jump off the bandwagon too quickly.
The best argument for vim9 is performance. We have found a way kind of 'compile' or speedup the load time for ObjectSense. In practice, we could really compile such code into binary and wire it with the language runtime, and without asking developers to learn a completely new language, i.e., being 100% compatible with existing VimL8 syntax and have the acclaimed performance at the same time. However, in our scenario ObjectSense performance issues have been tackled by the semi-compile approach, so no effort was directed to do the real compiling work which could bloat the code base exponentially.
]]>我的 lua 文件是这样设置的,nvim 的 keymap 文档还是看不太懂 keymap.set("i","<leader>y",""+y")
请问应该怎么修改
]]>如上图,我首先使用了 yiw
yank 了 color 单词,然后我想把后面的单词都粘贴为 color ,可是我每次在 Visual 模式下粘贴,都会使用上次被覆盖的单词,层层递进一样???
我整个系统全是这样的情况,idea-vim ,vscode-vim 都是这样的情况。
我在之前的使用过程,没有这样的情况啊? 是我自己的电脑有问题吗?
]]>我的 Vim 已经设成支持剪贴板特性features同时配置文件也设为"clipboard = unnamed".vimrc setting。
我也尝试了这个链接上的可能方案How to copy selected lines to clipboard in vim。我所能想到的遗漏的地方是:X11 与 Windows 的兼容性,因为我的 Mac 仅仅上述的配置就成功了。
另外,我的 ssh 配置了 X11 转发SSH CONFIG
]]>struct ListNode
这个结构体给复制粘贴到下面,应该怎样操作 /** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : val(x), next(nullptr) {} * ListNode(int x, ListNode *next) : val(x), next(next) {} * }; */
]]>然后参考(抄袭)别人的配置,但考虑到后期维护这些插件的 lua 配置文件,我还是退回用 coc.nvim,不折腾了
]]>感谢奉献的大佬, 这下 neovim 后续维护稳得一批了
按照 neovim 现在这个势头更新下去, vim 应该是逐渐被边缘化了呢, vim 活跃度完全比不了 neovim
]]>:colorscheme neucs
的时候,会随机加载一个调色板,但是感觉没什么意思。 现在用 lua 写了个新的(结果就是 Vim 不能用了),更新了随机算法——除了每次使用:colorscheme neudom
会随机加载一个调色板,还会对颜色进行 shuffle ,所以同一个调色板也会出现不同的高亮效果。
相关文件:
WSL Ubuntu 的 vim 打开文件,是按格式配色的
请问下怎么让 macOS 的 vim 也有颜色呢?
好像 Google 内部有,但是不开源? https://www.reddit.com/r/neovim/comments/v9yzv6/protobuf_lsp_setup/
大家都用哪个 lsp 写 protobuf ?
]]>其实我也在练习右手小拇指按右侧的 shift ,但我感觉真的不习惯,而且也很累,还是大拇指按 fn1 方便。
而且大部分 Alice 的键盘 fn1 的布局都在空格键右侧,可以说非常兼容。
最让爽的是,在把 fn1 区的 hjkl 改成方向键以后,有时候在不是 vim 编辑的情况下, 我还是可以熟悉的利用 vim 的移动。
有段时间我把 fn1 下的方向键( or WASD )改成了鼠标移动,然后还配了鼠标左右键,但用起来还是太糟糕了。
你可能会说,我没有支持 via 的键盘,那,,,,就当我说的是废话吧。 仅提供一个思路
]]>比较理想的是像 VSCode Remote 那样的体验,操作、渲染在本地实现,只在后台异步同步,同时 LSP 也是使用服务端的
简单尝试过 sshfs ,虽然操作(移动光标)是流畅了,但问题更多。不说 LSP/Terminal ,单文件系统的速度就慢的不行,完全没法用
也看过社区中的相关讨论: https://github.com/neovim/neovim/issues/21635 , 没得到什么结论
为什么不直接在本地开发?
为什么直接使用 VSCode + Vim 插件?
如果退出 insert mode ,按 A 可以做到,但感觉好麻烦。
如果是在别的地方,使用 Emacs 的快捷键 ctrl+e 可以到末尾,或者 ctrl+f 前进一个字符都是很方便的。
]]>怎么图还出不来啊!!!! 这么写有问题么? 
]]>在 这里 记录自己迁移过程和一些问题。
]]>因为需要折腾服务器需要用倒是会用, 但仅限于 SSH 终端中简单编辑文件.
很好奇大家用 Vim 写代码是怎么写的(是编辑器插件还是? 代码提示和高亮?), 以及想入门有什么教程可以参考吗?
]]>