一、高亮效果類似如下圖:
二、安裝方法
首先,安裝Bundle插件管理器,安裝參考:
https://blog.csdn.net/sinat_29891353/article/details/88367335
然後vim ~/.vimrc文件添加一行:
Bundle 'Mark'
然後按shift+:進入命令模式,輸入PluginInstall,稍等一會兒即可完成安裝。
三、使用方法
默認快捷鍵:\+m高亮,\+n取消高亮。
參考官網:https://www.vim.org/scripts/script.php?script_id=2666
<Leader>m Mark the word under the cursor, similar to the star
command. The next free highlight group is used.
If already on a mark: Clear the mark, like
<Leader>n.
四、修改默認快捷鍵
vim ~/.vimrc添加如下一行:即可修改\+m快捷鍵爲Ctrl+m快捷鍵:也可以改成其他快捷鍵。
nmap <C-m> <leader>m