You are not logged in.
Pages: 1
Well I just installed vim-latexsuite package and I'm having some strange binding problem, when I'm in the insert mode and press "~a", vim prints "\cite{}<++>", that's quite annoying cause there's a "ã" in my name. I checked the manual and found nothing like this. Here's my .vimrc:
" No VI compatibility
set nocompatible
" Mostra sempre a posição do cursor
set ruler
" vai até resultado da busca enquanto digita
set incsearch
" destaca termos buscados
set hlsearch
" indentação automática
set autoindent
" numera as linhas
set number
" ignora caixa na busca
set ignorecase
" fecha chaves
set showmatch
" allow backspacing over everything in insert mode
set backspace=indent,eol,start
" detecta o tipo de arquivo
filetype plugin indent on
" syntax highlight
syntax on
" cores de acordo com fundo negro
set bg=dark
" comando para compilar em LaTeX
" :command LaTeXbuild !clear && mkdir -p ./output && rubber --pdf --maxerr -1 --warn all --force --short --into ./output v:this_session && gnome-open ./output/main.pdf
" keybinding para compilação em LaTeX
" :nmap <S-F12> :LaTeXbuild<CR>
" usar mouse no modo visual
:set mouse=a
" paste-mode
:map <F10> :set invpaste<CR>
" make backup files
set backup
set backupdir=~/.vim/backup
" vim-latex suite
filetype plugin on
set grepprg=grep\ -nH\ $*
let g:tex_flavor='latex'
Any idea?
Offline
I think the correct way to write "ã" in latex is
\tilde{a}
The tilde sign (~) is a special character in latex (I think it's used for non-braking spaces) and cannot be used on its own, ie. has to be escaped by using "\".
If you need futher information on special characters in latex, have a look at this:
Overview:
http://ctan.unsw.edu.au/info/symbols/co … ymbols.pdf
Comprehensive:
http://www.ctan.org/tex-archive/info/sy … letter.pdf
Edit: copied wrong link from google
Last edited by JackH79 (2010-02-21 03:51:41)
Offline
Thanks man but that's not actually what I was looking for, I had to set some mappings to use accents (I'm brazillian). Help can be found here: http://www.tex-br.org/index.php/Latex-suite
Last edited by rgb (2010-02-21 15:39:25)
Offline
Did you escape it. This one does work here:
% File: mytest.tex
% Created: So Feb 21 06:00 2010 C
% Last Change: So Feb 21 06:00 2010 C
%
\documentclass[a4paper]{article}
\begin{document}
print a tilde a: \~a. Done.
\end{document}
There should be no problem at all if you use UTF-8. Just load this package in your prambles:
\usepackage[utf8]{inputenc}
Edit: Sorry, I obviously misunderstood. It is not about latex not printing ã but vim-latexsuite interpreting your "~a" keypresses as command, is it?
Well, tried it, and got the "\cite{}<++>" as well.
It should be possible to redefine such sequences. This is mentioned somewhere in the latexsuite help. You may grep the latexsuite sources for "cite" as well.
If I get the time I will possibly give it a try later and report back.
Last edited by bernarcher (2010-02-21 18:12:34)
To know or not to know ...
... the questions remain forever.
Offline
Have you tried altering the value for g:Tex_Leader in your ~/.vim/ftplugin/tex.vim? On the default install of vim latex-suite when I downloaded it, the backtick (`) followed by various letters would auto-expand into various greek letters and other things (I believe `a expanded into \alpha). This is obviously not exactly the same as what you've described here, and I haven't been able to find default expansions into \cite{} in the latex-suite files on my machine, but perhaps there are different defaults for different keyboard layouts? (The defaults should be specified in ~/.vim/ftplugin/latex-suite/texrc) In any case, you might try custom-setting that variable, e.g. with "let g:Tex_Leader='!'" in your tex.vim, and see if that helps.
Offline
@moose jaw
Redefinition of g:Tex_Leader does not work. I use '#' as Tex_Leader (because it is easier to type on a QWERTZ keyboard), but the ~a problem persists. As far as I understand now this appears to be a real bug, probably caused by the UTF-8 code sequence for ã.
Look at these tilde characters as input in my mytest.tex file:
õĩũ\cite{}ÕĨŨÃ
BTW, the UTF-8 sequence for ã is 0xC3 0xA3.
Edit:
As a temporary workaround you may want to define an imap replacement in your .vimrc, like:
" Provisional ã key mapping
" (Workaround for vim-latex bug)
imap <C-a> \~a
Last edited by bernarcher (2010-02-22 03:49:08)
To know or not to know ...
... the questions remain forever.
Offline
Sorry rgb for the misunderstanding.
I was able to reproduce your problem with the "\cite{}<++>" output. I had to copy the letter from this webpage, as I have a US keyboard. Funnily enough though, when I saved that character in a UTF-8 encoded file, opened that with vim in split screen and yanked it from one file to the other, it copied the ã without a problem.
Maybe someone can offer an explanaion as to what's going on.
Offline
The issue is obviously on the character input side. I tried some debug runs but as yet to no avail.
Perhaps some googling will provide more insight. I will try this tonight (german time).
To know or not to know ...
... the questions remain forever.
Offline
Hello,
I had also been scratching my head trying to figure out a solution to this problem (I'm also Brazilian and absolutely NEED to type the characters é, ã, and â very often).
Today I finally found it!
http://thisblog.runsfreesoftware.com/files/vimrc
The relevant part is this, which you should copy and paste into your .vimrc:
"To solve the propleme with vim-latexsuite has with ã and â
imap <buffer> <silent> <M-C> <Plug>Tex_MathCal
imap <buffer> <silent> <M-B> <Plug>Tex_MathBF
imap <buffer> <leader>it <Plug>Tex_InsertItemOnThisLine
imap <buffer> <silent> <M-A> <Plug>Tex_InsertItem
"imap <buffer> <silent> <M-E> <Plug>Tex_InsertItem
"imap <buffer> <silent> <M-e> <Plug>Tex_InsertItemOnThisLine
imap <buffer> <silent> \c <Plug>Traditional
map <buffer> <silent> é é
map <buffer> <silent> á á
map <buffer> <silent> ã ã
"imap ã <Plug>Tex_MathCal
"imap é <Plug>Traditional
Now, I'm not exactly sure what it does to the rest of latex-suite, but it worked for me.
Best of luck to you.
Offline
I'm have problem with '`i', '~a', '^A'
`i -> \label{}<++>
~a -> \cite{}<++>
^A -> \mathbf{}
Know anybody how to fix this bug ?
thanks
Last edited by robsonpeixoto (2011-01-22 12:20:06)
Offline
Offline
This solution worked for me as well. I'm also Brazilian and this was driving me crazy.
Just a reminder, I had to put these lines in the file /etc/vimrc.
Hello,
I had also been scratching my head trying to figure out a solution to this problem (I'm also Brazilian and absolutely NEED to type the characters é, ã, and â very often).
Today I finally found it!
http://thisblog.runsfreesoftware.com/files/vimrc
The relevant part is this, which you should copy and paste into your .vimrc:
"To solve the propleme with vim-latexsuite has with ã and â imap <buffer> <silent> <M-C> <Plug>Tex_MathCal imap <buffer> <silent> <M-B> <Plug>Tex_MathBF imap <buffer> <leader>it <Plug>Tex_InsertItemOnThisLine imap <buffer> <silent> <M-A> <Plug>Tex_InsertItem "imap <buffer> <silent> <M-E> <Plug>Tex_InsertItem "imap <buffer> <silent> <M-e> <Plug>Tex_InsertItemOnThisLine imap <buffer> <silent> \c <Plug>Traditional map <buffer> <silent> é é map <buffer> <silent> á á map <buffer> <silent> ã ã "imap ã <Plug>Tex_MathCal "imap é <Plug>Traditional
Now, I'm not exactly sure what it does to the rest of latex-suite, but it worked for me.
Best of luck to you.
Offline
Pages: 1