1
0
mirror of https://github.com/balkian/dotfiles.git synced 2024-11-21 19:52:29 +00:00

Fixed latex+okular in vim

This commit is contained in:
J.Fernando Sánchez 2013-03-07 16:25:52 +01:00
parent e1bd31308f
commit 115a9e3118
2 changed files with 24 additions and 24 deletions

View File

@ -7,5 +7,14 @@ endfunction
nmap <Leader>f :call SyncTexForward()<CR> nmap <Leader>f :call SyncTexForward()<CR>
map <leader>ct yyp:s/begin/end/<CR> map <leader>ct yyp:s/begin/end/<CR>
"Latex
let g:tex_flavor = "latex"
set suffixes+=.log,.aux,.bbl,.blg,.idx,.ilg,.ind,.out,.pdf
let g:LatexBox_latexmk_options="-pvc"
let g:Tex_CompileRule_pdf = 'pdflatex --synctex=1 -interaction=nonstopmode $*'
let g:LatexBox_output_type="pdf"
let g:LatexBox_viewer="okular --unique"
let tlist_tex_settings = 'latex;l:labels;s:sections;t:subsections;u:subsubsections'

39
vimrc
View File

@ -52,19 +52,6 @@ set hlsearch
let mapleader="," let mapleader=","
noremap \ , noremap \ ,
"Latex
let g:tex_flavor = "latex"
set suffixes+=.log,.aux,.bbl,.blg,.idx,.ilg,.ind,.out,.pdf
let g:LatexBox_latexmk_options="-pvc"
let g:LatexBox_output_type="pdf"
let g:LatexBox_viewer="okular --unique"
let tlist_tex_settings = 'latex;l:labels;s:sections;t:subsections;u:subsubsections'
" Commenting blocks of code. " Commenting blocks of code.
autocmd FileType c,cpp,java,scala,javascript let b:comment_leader = '// ' autocmd FileType c,cpp,java,scala,javascript let b:comment_leader = '// '
autocmd FileType sh,ruby,python let b:comment_leader = '# ' autocmd FileType sh,ruby,python let b:comment_leader = '# '
@ -130,17 +117,21 @@ hi SpellBad ctermbg=Red ctermfg=White
set statusline=%t%h%m%r%y%{fugitive#statusline()}\%=[%{strlen(&fenc)?&fenc:'none'},%{&ff}]\ \ %c,%l/%L\ %P set statusline=%t%h%m%r%y%{fugitive#statusline()}\%=[%{strlen(&fenc)?&fenc:'none'},%{&ff}]\ \ %c,%l/%L\ %P
set laststatus=2 set laststatus=2
" Forward search function! InsertStatuslineColor(mode)
" function! PDFForward() if a:mode == 'i'
" " if filereadable(b:RootFileName.".".b:Ext) hi statusline guibg=Red ctermfg=White guifg=White ctermbg=Red
" elseif a:mode == 'r'
" " silent! call system("okular --unique \"".b:RootFileName.".".b:Ext."\"\#src:".line('.').expand("%")." &") hi statusline guibg=Blue ctermfg=White guifg=White ctermbg=Blue
" else
" silent! call system(g:LatexBox_viewer . " \"".LatexBox_GetOutputFile()."#src:".line('.')."".expand("%:p")."\" &") hi statusline guibg=Yellow ctermfg=White guifg=Black ctermbg=Yellow
" " else endif
" " echo "Output file not readable." endfunction
" " endif
" endfunction call InsertStatuslineColor('')
au InsertEnter * call InsertStatuslineColor(v:insertmode)
au InsertLeave * call InsertStatuslineColor('')
" Encryption " Encryption
" set cm=blowfish " set cm=blowfish