vim如何设置显示行号
时间: 2023-10-19 09:33:50 浏览: 174
要在vim中设置显示行号,你需要编辑vim的配置文件.vimrc。这个文件通常位于当前用户的根目录下。首先,你可以使用以下命令来创建或编辑这个文件:vim ~/.vimrc。然后,在打开的.vimrc文件中的最后一行输入命令:set number或者set nu。保存并退出文件。之后,当你再次使用vim打开文件时,行号就会显示出来了。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [设置vim 显示行号](https://blog.csdn.net/qq_40855100/article/details/122943024)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [vim配置显示行号和语法高亮 即.vimrc文件的配置](https://download.csdn.net/download/weixin_38600460/14890940)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文