LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   vim conditional keymap when a tex file is open (http://www.linuxquestions.org/questions/linux-general-1/vim-conditional-keymap-when-a-tex-file-is-open-4175466540/)

RudraB 06-18-2013 05:31 PM

vim conditional keymap when a tex file is open
 
I am trying to make a keymap that will call latexmk when .tex is available (it would be better if .tex is the currently open and active buffer)

I tried :

Code:

:nnoremap <Leader>lw :if filereadable('*.tex')<cr>up!<cr>:!latexmk -pdf<cr>endif<cr>
when trying to make latexmk -pdf run, but unfortunately, its just prompting those line in the window, and doing nothing like:

Code:

~
:if filereadable('*.tex')
:  up!
:  :call Tex_RunLaTeX()
:  endif
Press ENTER or type command to continue

kindly help.

(it will be great, as told, if this can be done when .tex is the currently open and active buffer.)

anish2good 07-01-2013 02:06 AM

vim commands auto completion with known words
http://www.youtube.com/watch?v=oJT1AQZ6uuY

vim commands auto completion with dictionary
http://www.youtube.com/watch?v=4Ew8j_drmbE

for more videos
zariga


All times are GMT -5. The time now is 12:22 PM.