<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Vim on Sawyer Zheng's Blog</title><link>https://elated-raman-42e0c2.netlify.app/tags/vim/</link><description>Recent content in Vim on Sawyer Zheng's Blog</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Wed, 24 Sep 2025 14:10:50 +0800</lastBuildDate><atom:link href="https://elated-raman-42e0c2.netlify.app/tags/vim/index.xml" rel="self" type="application/rss+xml"/><item><title>Vimscript</title><link>https://elated-raman-42e0c2.netlify.app/post/notes/vim/vimscript/</link><pubDate>Thu, 19 May 2022 00:00:00 +0000</pubDate><guid>https://elated-raman-42e0c2.netlify.app/post/notes/vim/vimscript/</guid><description>&lt;div id="outline-container-headline-1" class="outline-2"&gt;
&lt;h2 id="headline-1"&gt;
参考
&lt;/h2&gt;
&lt;div id="outline-text-headline-1" class="outline-text-2"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://learnvimscriptthehardway.stevelosh.com/"&gt;Learn Vimscript the Hard Way&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id="outline-container-headline-2" class="outline-2"&gt;
&lt;h2 id="headline-2"&gt;
echo
&lt;/h2&gt;
&lt;div id="outline-text-headline-2" class="outline-text-2"&gt;
&lt;p&gt;作用： 类似 python 中的 print, 打印到 minibuffer&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;打印变量&lt;/li&gt;
&lt;li&gt;打印字符串&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id="outline-container-headline-3" class="outline-2"&gt;
&lt;h2 id="headline-3"&gt;
echom
&lt;/h2&gt;
&lt;div id="outline-text-headline-3" class="outline-text-2"&gt;
&lt;p&gt;作用：类似 &lt;code class="verbatim"&gt;echo&lt;/code&gt;, 打印结果在 &lt;code class="verbatim"&gt;:messages&lt;/code&gt; 中保存一份&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id="outline-container-headline-4" class="outline-2"&gt;
&lt;h2 id="headline-4"&gt;
set
&lt;/h2&gt;
&lt;div id="outline-text-headline-4" class="outline-text-2"&gt;
&lt;p&gt;作用： 设置 options&lt;/p&gt;
&lt;p&gt;
options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;代码行号&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;number : 代码行号&lt;/li&gt;
&lt;li&gt;nonumber : 无行号&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;number! : toggle&lt;/p&gt;</description></item><item><title>neovim</title><link>https://elated-raman-42e0c2.netlify.app/post/notes/vim/nvim/</link><pubDate>Wed, 18 May 2022 00:00:00 +0000</pubDate><guid>https://elated-raman-42e0c2.netlify.app/post/notes/vim/nvim/</guid><description>&lt;div id="outline-container-headline-1" class="outline-2"&gt;
&lt;h2 id="headline-1"&gt;
参考
&lt;/h2&gt;
&lt;div id="outline-text-headline-1" class="outline-text-2"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/nanotee/nvim-lua-guide"&gt;GitHub - nanotee/nvim-lua-guide: A guide to using Lua in Neovim&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id="outline-container-headline-2" class="outline-2"&gt;
&lt;h2 id="headline-2"&gt;
cheat sheet
&lt;/h2&gt;
&lt;div id="outline-text-headline-2" class="outline-text-2"&gt;
&lt;div id="outline-container-headline-3" class="outline-3"&gt;
&lt;h3 id="headline-3"&gt;
打开文件
&lt;/h3&gt;
&lt;div id="outline-text-headline-3" class="outline-text-3"&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;:r, :read&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;加载内容到 buffer&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;:e, :edit&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id="outline-container-headline-4" class="outline-3"&gt;
&lt;h3 id="headline-4"&gt;
帮助
&lt;/h3&gt;
&lt;div id="outline-text-headline-4" class="outline-text-3"&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code class="verbatim"&gt;:help your-item&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code class="verbatim"&gt;:h &amp;lt;Ctrl+R&amp;gt; &amp;lt;Ctr + W&amp;gt;&lt;/code&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;获取 cursor 下单词的帮助， Ctr+R Ctr+W 会把光标下内容自动复制到 command 行中&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id="outline-container-headline-5" class="outline-3"&gt;
&lt;h3 id="headline-5"&gt;
配置
&lt;/h3&gt;
&lt;div id="outline-text-headline-5" class="outline-text-3"&gt;
&lt;div id="outline-container-headline-6" class="outline-4"&gt;
&lt;h4 id="headline-6"&gt;
配置选项查询
&lt;/h4&gt;
&lt;div id="outline-text-headline-6" class="outline-text-4"&gt;
&lt;ul&gt;
&lt;li&gt;:help option-list&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id="outline-container-headline-7" class="outline-4"&gt;
&lt;h4 id="headline-7"&gt;
查看配置
&lt;/h4&gt;
&lt;div id="outline-text-headline-7" class="outline-text-4"&gt;
&lt;ul&gt;
&lt;li&gt;:opt&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;单个配置&lt;/p&gt;</description></item><item><title>Vimium</title><link>https://elated-raman-42e0c2.netlify.app/post/notes/vim/vimium/</link><pubDate>Sat, 14 May 2022 00:00:00 +0000</pubDate><guid>https://elated-raman-42e0c2.netlify.app/post/notes/vim/vimium/</guid><description>&lt;div id="outline-container-headline-1" class="outline-2"&gt;
&lt;h2 id="headline-1"&gt;
Vomnibar
&lt;/h2&gt;
&lt;div id="outline-text-headline-1" class="outline-text-2"&gt;
&lt;p&gt;按键：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;o&lt;/code&gt; 或 &lt;code&gt;O&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div id="outline-container-headline-2" class="outline-3"&gt;
&lt;h3 id="headline-2"&gt;
Search Engine
&lt;/h3&gt;
&lt;div id="outline-text-headline-2" class="outline-text-3"&gt;
&lt;p&gt;参考：&lt;a href="https://github-wiki-see.page/m/philc/vimium/wiki/Search-Engines"&gt;Search Engines - philc/vimium Wiki&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;
触发模式：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Shortcutkeyword&amp;lt;空格&amp;gt;搜索词&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;常用 Engines&lt;/p&gt;
&lt;div class="src src-conf"&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt; 1
&lt;/span&gt;&lt;span class="lnt"&gt; 2
&lt;/span&gt;&lt;span class="lnt"&gt; 3
&lt;/span&gt;&lt;span class="lnt"&gt; 4
&lt;/span&gt;&lt;span class="lnt"&gt; 5
&lt;/span&gt;&lt;span class="lnt"&gt; 6
&lt;/span&gt;&lt;span class="lnt"&gt; 7
&lt;/span&gt;&lt;span class="lnt"&gt; 8
&lt;/span&gt;&lt;span class="lnt"&gt; 9
&lt;/span&gt;&lt;span class="lnt"&gt;10
&lt;/span&gt;&lt;span class="lnt"&gt;11
&lt;/span&gt;&lt;span class="lnt"&gt;12
&lt;/span&gt;&lt;span class="lnt"&gt;13
&lt;/span&gt;&lt;span class="lnt"&gt;14
&lt;/span&gt;&lt;span class="lnt"&gt;15
&lt;/span&gt;&lt;span class="lnt"&gt;16
&lt;/span&gt;&lt;span class="lnt"&gt;17
&lt;/span&gt;&lt;span class="lnt"&gt;18
&lt;/span&gt;&lt;span class="lnt"&gt;19
&lt;/span&gt;&lt;span class="lnt"&gt;20
&lt;/span&gt;&lt;span class="lnt"&gt;21
&lt;/span&gt;&lt;span class="lnt"&gt;22
&lt;/span&gt;&lt;span class="lnt"&gt;23
&lt;/span&gt;&lt;span class="lnt"&gt;24
&lt;/span&gt;&lt;span class="lnt"&gt;25
&lt;/span&gt;&lt;span class="lnt"&gt;26
&lt;/span&gt;&lt;span class="lnt"&gt;27
&lt;/span&gt;&lt;span class="lnt"&gt;28
&lt;/span&gt;&lt;span class="lnt"&gt;29
&lt;/span&gt;&lt;span class="lnt"&gt;30
&lt;/span&gt;&lt;span class="lnt"&gt;31
&lt;/span&gt;&lt;span class="lnt"&gt;32
&lt;/span&gt;&lt;span class="lnt"&gt;33
&lt;/span&gt;&lt;span class="lnt"&gt;34
&lt;/span&gt;&lt;span class="lnt"&gt;35
&lt;/span&gt;&lt;span class="lnt"&gt;36
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-fallback" data-lang="fallback"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;b: https://www.baidu.com/s?wd=%s 百度
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gh: https://github.com/search?q=%s GitHub
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;hn: https://hn.algolia.com/?dateRange=all&amp;amp;page=0&amp;amp;prefix=false&amp;amp;query=%s&amp;amp;sort=byPopularity&amp;amp;type=story HackerNews
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;s: https://stackoverflow.com/search?q=%s StackOverflow
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;dh: https://hub.docker.com/search?q=%s DockerHubw: https://en.wikipedia.org/wiki/Special:Search?search=%s Wikipedig: https://www.google.com/search?q=%s Google
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gi: https://www.google.com/search?tbm=isch&amp;amp;q=%s Google Images
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gm: https://www.google.com/maps?q=%s Google Maps
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;recent: https://www.google.com/search?hl=en&amp;amp;tbo=1&amp;amp;tbs=qdr:y&amp;amp;q=%s Google (last year only)
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;gt: https://translate.google.com/?source=osdd#auto|auto|%s Google Translate
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;d: https://duckduckgo.com/?q=%s DuckDuckGo
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;a: https://www.amazon.com/exec/obidos/external-search/?field-keywords=%s&amp;amp;mode=blended Amazon
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;e: https://www.ebay.com/sch/?_nkw=%s eBay
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;by: https://www.bing.com/search?setmkt=en-GB&amp;amp;q=%s Bing
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;so: https://stackoverflow.com/search?q=%s StackOverflow
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;su: https://superuser.com/search?q=%s SuperUser
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;sh: http://symbolhound.com/?q=%s SymbolHound
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;ud: https://www.urbandictionary.com/define.php?term=%s UrbanDictionary
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;wa: https://www.wolframalpha.com/input/?i=%s Wolfram|Alpha
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;qw: https://www.qwant.com/?q=%s&amp;amp;t=all
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;yt: https://www.youtube.com/results?search_query=%s YouTube
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;imdb: https://www.imdb.com/find?s=all&amp;amp;q=%s IMDB
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;trello: https://trello.com/search?q=%s Trello
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;search.creativecommons.org: https://ccsearch.creativecommons.org/?search_fields=title&amp;amp;search_fields=creator&amp;amp;search_fields=tags&amp;amp;search=%s
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;search.yahoo.com: https://search.yahoo.com/search?p=%s&amp;amp;ei=UTF-8
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;w: https://en.wikipedia.org/w/index.php?title=Special:Search&amp;amp;search=%s
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Find your way from your home to places using Google Maps
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;home: https://www.google.com/maps/dir/home/%s
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Use google to search the current site you&amp;#39;re on
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;site: javascript:location=&amp;#39;https://www.google.com/search?num=100&amp;amp;q=site:&amp;#39;+escape(location.hostname)+&amp;#39;+%s&amp;#39;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;# Use google
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;g: https://www.google.com/search?q=%s&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id="outline-container-headline-3" class="outline-2"&gt;
&lt;h2 id="headline-3"&gt;
caret mode
&lt;/h2&gt;
&lt;div id="outline-text-headline-3" class="outline-text-2"&gt;
&lt;p&gt;用途： 在 visual mode 内部使用，调节 cursor 起始位置&lt;/p&gt;</description></item><item><title>vim notes</title><link>https://elated-raman-42e0c2.netlify.app/post/notes/vim/vim/</link><pubDate>Wed, 11 May 2022 00:00:00 +0000</pubDate><guid>https://elated-raman-42e0c2.netlify.app/post/notes/vim/vim/</guid><description>&lt;div id="outline-container-headline-1" class="outline-2"&gt;
&lt;h2 id="headline-1"&gt;
Cheat Sheet
&lt;/h2&gt;
&lt;div id="outline-text-headline-1" class="outline-text-2"&gt;
&lt;ul&gt;
&lt;li&gt;参考：&lt;a href="https://vim.rtorr.com/"&gt;Vim Cheat Sheet&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;nvim: &lt;a href="https://neovim.io/doc/user/quickref.html#quickref"&gt;Nvim documentation: quickref&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;nvim lua guid: &lt;a href="https://github.com/nanotee/nvim-lua-guide"&gt;GitHub - nanotee/nvim-lua-guide: A guide to using Lua in Neovim&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;教程：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://learnbyexample.github.io/vim_reference/Command-line-mode.html"&gt;Command-line mode - Vim Reference Guide&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;vimscript&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://learnvimscriptthehardway.stevelosh.com/"&gt;Learn Vimscript the Hard Way&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div id="outline-container-headline-2" class="outline-2"&gt;
&lt;h2 id="headline-2"&gt;
插件
&lt;/h2&gt;
&lt;div id="outline-text-headline-2" class="outline-text-2"&gt;
&lt;div id="outline-container-headline-3" class="outline-3"&gt;
&lt;h3 id="headline-3"&gt;
vim-surround
&lt;/h3&gt;
&lt;div id="outline-text-headline-3" class="outline-text-3"&gt;
&lt;p&gt;参考： &lt;a href="https://github.com/tpope/vim-surround"&gt;GitHub - tpope/vim-surround: surround.vim: Delete/change/add parentheses/quot…&lt;/a&gt;&lt;/p&gt;</description></item></channel></rss>