I resolve partially the problem.

I change something in compiler.vim.
I add some rule for okular.
In attachment diff file from old compiler.vim file to new.

Now my configs line in vimrc for vim-latex are:
autocmd FileType tex setlocal spell spelllang=it
let g:tex_flavor='latex'
let g:Tex_CompileRule_dvi='latex -src-specials -interaction=nonstopmode $*'
let g:Tex_ViewRule_dvi = 'okular'
autocmd Filetype tex imap <C-i> <Plug>Tex_InsertItemOnThisLine
let g:Tex_ItemStyle_list = '\item <++>'

I can start okular and view dvi file with \lv.
I can start search forward in okular with \ls.

I have got one question: is it possible to start just one time okular with \ls 
and the second 
time I use \ls tell to okular to move the view in the specific line under the 
cursor and not 
open another time another okular view?

Can you give me a feedback?

Thank you.


In data 24/4/2010 01:17:24, Mario Santagiuliana ha scritto:
> Hy, I'm Mario Santagiuliana.
> I am an Italian Medical Student. Excuse me for my bad English.
> 
> I want to configure vim-latex to search forward in dvi file.
> I'm working on fedora 12 64-bit. My desktop enviroment is Kde 4.4.2 so I
> use Okular.
> 
> My vim installation:
> $ rpm -qa|grep vim|sort
> vim-common-7.2.411-1.fc12.x86_64
> vim-enhanced-7.2.411-1.fc12.x86_64
> vim-latex-1.8.23-1.20091230.r1079.fc12.noarch
> vim-latex-doc-1.8.23-1.20091230.r1079.fc12.noarch
> vim-minimal-7.2.411-1.fc12.x86_64
> vim-X11-7.2.411-1.fc12.x86_64
> 
> My vimrc configuration for vim-latex:
> autocmd FileType tex setlocal spell spelllang=it
> let g:tex_flavor='latex'
> let g:Tex_CompileRule_dvi='latex -src-specials -interaction=nonstopmode $*'
> let g:Tex_ViewRuleComplete_dvi = 'okular $*.dvi >/dev/null 2>&1 &'
> autocmd Filetype tex imap <C-i> <Plug>Tex_InsertItemOnThisLine
> let g:Tex_ItemStyle_list = '\item <++>'
> 
> In Okular I setup my editor with this line:
> vimx --remote-tab-silent +%l %f
> 
> I start to edit a tex file without problem in vim. Generally I edit file
> with: $ vimx --servername VIMX file.tex
> so from Okular I can performe inverse search into my vim just opened.
> From vim with \ll I can compile my code. With \lv I can open Okular e from
> that I can do inverse search.
> 
> With \ls I have nothing.
> 
> From bash I can open my dvi file and view the line that I remember from vim
> session. For example I edit line 45 and I want to view (search forward) my
> change, whit \ls I can't do that, from commad line (bash) I can do that:
> $ okular file.dvi#src:45
> 
> Have you got any suggestion?
> 
> Okular from versione 0.10 support forward search:
> http://okular.kde.org/news.php#itemOkular010released
> 
> Thank you very much :)
-- 
Mario Santagiuliana
www.marionline.it
--- compiler.vim.BACKUP	2010-04-24 10:41:31.812629416 +0200
+++ compiler.vim	2010-04-24 11:31:10.165629456 +0200
@@ -281,8 +281,10 @@
 				let execString = 'kdvi --unique $*.dvi'
 
 			else
-
-				let execString = s:viewer.' $*.dvi'
+                                " I add '>/dev/null 2>&1' because I want stop
+                                " to view the output of the xdg-open in my
+                                " latex code.
+				let execString = s:viewer.' $*.dvi >/dev/null 2>&1'
 
 			endif
 
@@ -373,7 +375,7 @@
 		" We're either UNIX or Mac and using a UNIX-type viewer
 
 		" Check for the special DVI viewers first
-		if (viewer == "xdvi" || viewer == "xdvik" || viewer == "kdvi" )
+		if (viewer == "xdvi" || viewer == "xdvik" || viewer == "kdvi" || viewer == "okular")
 
 			if Tex_GetVarValue('Tex_UseEditorSettingInDVIViewer') == 1 &&
 						\ exists('v:servername') &&
@@ -391,6 +393,11 @@
 
 				let execString = 'silent! !'.viewer.' -name xdvi -sourceposition '.line('.').expand("%").' '.mainfnameRoot.'.dvi'
 
+			elseif viewer == "okular"
+
+				let execString = 'silent! !okular '.mainfnameRoot.'.dvi\#src:'.line('.').expand("%").' >/dev/null 2>&1'
+
+
 			endif
 
 		else

Attachment: signature.asc
Description: This is a digitally signed message part.

------------------------------------------------------------------------------
_______________________________________________
Vim-latex-devel mailing list
Vim-latex-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vim-latex-devel

Reply via email to