vim-latex简单配置

1. 下载vim-latex
2. 解压,复制到vim安装目录下的vimfiles内
3. 按照vim-latex说明, 在vimrc中增加
   
 
" REQUIRED. This makes vim invoke Latex-Suite when you open a tex file.
filetype plugin on

" IMPORTANT: win32 users will need to have 'shellslash' set so that latex
" can be called correctly.
set shellslash

" IMPORTANT: grep will sometimes skip displaying the file name if you
" search in a singe file. This will confuse Latex-Suite. Set your grep
" program to always generate a file-name.
set grepprg=grep\ -nH\ $*

" OPTIONAL: This enables automatic indentation as you type.
filetype indent on

" OPTIONAL: Starting with Vim 7, the filetype of empty .tex files defaults to
" 'plaintex' instead of 'tex', which results in vim-latex not being loaded.
" The following changes the default filetype back to 'tex':
let g:tex_flavor='latex'


4. 设置快捷键
"注意目录中有空格如何处理,另外当前文件所在目录中不能有空格
"初始化
noremap <F2> :!pdftex -initialize pdflatex.ini<Enter>
"保存, 输出
noremap <F3> <ESC>:w<CR> :!pdflatex <C-R>=expand("%:p")<CR><Enter><Enter>
"调用foxit reader显示pdf, :slient可以关闭press any key to close... 的窗口
noremap <F4> :silent :!C:\"Program Files"\"Foxit Software"\"Foxit Reader"\"Foxit Reader.exe" <C-R>=expand('%:p:h')<CR>"\\"%<.pdf <Enter>
 
最后, 空格在vimrc中简直是祸害.........
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值