vim 新建文件添加模板
2018-03-04 00:00
387 查看
$ vi ~/.vim/sh_header.temp
Custom Header Template for Scripts
#!/bin/bash
###################################################################
#Script Name :
#Description :
#Args :
#Author :usename
#Email :xcccc@gmail.com
###################################################################
Configure autocmd in Vimrc File
vi ~/.vimrc #添加以下内容
au bufnewfile *.sh 0r /home/aaronkilik/.vim/sh_header.temp
解释:
.au – means autocmd
.bufnewfile – event for opening a file that doesn’t exist for editing.
.*.sh – consider all files with .sh extension.
Custom Header Template for Scripts
#!/bin/bash
###################################################################
#Script Name :
#Description :
#Args :
#Author :usename
#Email :xcccc@gmail.com
###################################################################
Configure autocmd in Vimrc File
vi ~/.vimrc #添加以下内容
au bufnewfile *.sh 0r /home/aaronkilik/.vim/sh_header.temp
解释:
.au – means autocmd
.bufnewfile – event for opening a file that doesn’t exist for editing.
.*.sh – consider all files with .sh extension.
相关文章推荐
- vim: 新建文件时自动添加信息
- 在MyEclipse 中添加自己定义的文件模版(----为myeclipse新建一个tapestry 5的tml模板)
- django 在pycharm 中添加模板省去每次新建py文件都要写一样的开头
- vim 新建文件后自动插入模板
- VS中如何自定义新建文件模板(添加自定义版权信息)
- vim在新建文件时插入模板文件的内容
- [Vim]新建python文件自动添加python header
- [Vim]新建python文件自动添加python header
- 注册表-桌面右键添加新建文件夹类型(可以设置新建文件的模板)
- VS2008 修改模板,让项目文件自动添加版权信息
- Pycharm新建模板默认添加个人信息
- intellij idea 2017.3 新建JAVA类不自动添加模板代码注释的解决方案
- VS2008中自定义C++工程模板与修改新建文件默认编码的办法
- Ubuntu右键菜单添加新建OpenOffice文件
- 如何将word等office文件添加到右键的新建菜单
- vim中自动添加文件注释到文本中
- 使用VIM将文件的其中的连续几行注释删除或者给其中的连续几行添加注释
- vim中自动添加文件的作者、时间信息、版本等
- 使用自定义模板为Myeclipse添加新建Filter的功能
- 乌班图终端命令python,Vim编辑器快捷键/查找文件/添加组/sudo权限/用户账号