Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

vim · Vim (Vi IMproved) text editor users list

The Yahoo! Groups Product Blog

Check it out!

Group Information

? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Messages

Advanced
Messages Help
Messages 87019 - 87048 of 138223   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#87019 From: haron <anton.sharonov@...>
Date: Fri Feb 1, 2008 12:17 pm
Subject: vim7 xml/docbook spellcheck : comments only ?
anton.sharonov@...
Send Email Send Email
 
Hi All,

Using ":setlocal spell spellang=en_US" (as advised from :help spell-
quickstart) I get with following example docbook:
...
   <!-- <para> (A)sistem is wrong, system is right <para> -->
   <para> (B)sistem is wrong, system is right <para>
...
(A) highlighted as spelling error, but not (B).

Settings are:
:set filetype syntax
   filetype=xml
   syntax=docbk

I have tried with ":set filetype=text", (after that syntax is set to
"syntax=text" automatically), but in this case I obviously loose
syntax highlighting and closing tag matching for DocBook / XML.

Anybody knows how to keep docbk + xml syntax features enabled, still
having (A) and (B) recognized as spell errors ?
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87020 From: Volker Glave <volker.glave@...>
Date: Fri Feb 1, 2008 1:42 pm
Subject: Ctrl-T mapped to Toggle()
volker.glave@...
Send Email Send Email
 
There's a toggle.vim plugin here doing mappings
| 46 imap <S-C-T> <C-O>:call Toggle()<CR>
| 47 nmap <S-C-T> :call Toggle()<CR>

But instead as it seems the mapping goes to <C-T> ...
| :map <S-C-T>
| n  <C-T>         :call Toggle()<CR>
... so I'm losing default Ctrl-T (Jump to older entry in the
tag stack).

So, are S-C-mappings in general getting reshaped to
C-mappings?
Hm, from todo.txt:
"8   Should mapping <C-A> and <C-S-A> both work?"

More interestingly, what's the best way for me to
revert to normal C-T behaviour?
Should I unmap C-T in vimrc?
Should I disable toggle.vim plugin? How? Assume
that I don't have change/write access to the plugin
directory.

I'm using
| version 7.0.224
| :ver
| VIM - Vi IMproved 7.0 (2006 May 7, compiled May  1 2007 10:53:35)
| MS-Windows 32 bit console version
| Included patches: 1-224

Thanks in advance!
Volker
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87021 From: "A.Politz" <politza@...>
Date: Fri Feb 1, 2008 2:15 pm
Subject: Re: vim7 xml/docbook spellcheck : comments only ?
politza@...
Send Email Send Email
 
haron wrote:

>Hi All,
>
>Using ":setlocal spell spellang=en_US" (as advised from :help spell-
>quickstart) I get with following example docbook:
>...
>  <!-- <para> (A)sistem is wrong, system is right <para> -->
>  <para> (B)sistem is wrong, system is right <para>
>...
>(A) highlighted as spelling error, but not (B).
>
>Settings are:
>:set filetype syntax
>  filetype=xml
>  syntax=docbk
>
>I have tried with ":set filetype=text", (after that syntax is set to
>"syntax=text" automatically), but in this case I obviously loose
>syntax highlighting and closing tag matching for DocBook / XML.
>
>Anybody knows how to keep docbk + xml syntax features enabled, still
>having (A) and (B) recognized as spell errors ?
>
>
Try
:syn spell toplevel
:redraw

-ap



--
Ich hab geträumt, der Krieg wär vorbei.


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87022 From: seth <vim_3468@...>
Date: Fri Feb 1, 2008 2:55 pm
Subject: matchit: problem when matching end of function in matlab
vim_3468@...
Send Email Send Email
 
hi!

i want to use "matchit" to match begin and end of functions in matlab.
the begin is indicated by keyword "function". the end is implicitly
defined by next occurrence of "function" or end-of-file, whatever comes
first. example:

function foo
	 'something'
	 'something else'

function bar
	 'begin of bar'
	 'end of bar'

now i wanna match the beginning of functions and their implicit end.
therefore i tried

let b:match_words = '\<function\>:\%$\|\_.\%(\s*\<function\>\)\@='

begin = word "function"
end = eof or
       a place followed by optional spaces and the word "function"

but that end does not work as i want, because even if the cursor is at
'something' or somewhere at 'begin of bar' and i press '%', the cursor
jumps to the previous "function".
but i expected: no moving of cursor.
what did i do wrong?


background (jfyi):
/ftplugin/matlab.vim needs to be revised and i could do that partially
already, but there are still some problems.
in matlab every function may be ended by "end", but it many cases this
"end" may be omitted. but this is something i want to examine lateron.

tia!
seth

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87023 From: "Gene Kwiecinski" <gkwiecinski@...>
Date: Fri Feb 1, 2008 4:48 pm
Subject: RE: swap word
gkwiecinski@...
Send Email Send Email
 
>>'Though if this is C, you might wanna cast the NULL to whatever p
>>happens to be, so something like

>> (const char *)NULL == p
>> (struct foo *)NULL == p
>> (FILE *)NULL == p
>> (void *)NULL == p

>>etc., if it's a pointer to character data, a struct, a file, or a
>>generic nothing.  Fwiw...

>>And I happen to turn on *all* warnings, so even leaving it as-is will
>>trigger the "possible assignment in conditional" or whatever the
warning
>>would be, in the compiler stage.

>I hope not! It's not an assignment, it's a comparison. It has == not =.

Well, yeah, but the *reason* you do it "backwards", ie, compare the
constant with the variable instead of the variable to the constant, is
in case you accidentally forget one '=', a newbie mistakee, but hey,
typos happen...  So mistyping it as

	 if( p = NULL )...

will quietly assign NULL to p, finish the compilation and hand you the
compiled executable just fine, but that if() will always be false, and
the condition will never be taken, as well as irreparably munging p,
obviously a bug.  But having

	 if( NULL = p )...

will try to assign the value of p to a constant, a clear error, and
*not* let you go beyond that.  So you see the error, wonder "Wtf
happened??  Oh, forgot the 2nd '='... silly me.", fix it, recompile, and
everyone's happy.  :D

I was never crazy about assigning things "backwards", so I still do it
the

	 if( p == (whatever)NULL )...

way, only I turn on practically every allowable warning in existence.  I
got nicknamed "the human 'lint'" for casting practically *everything* to
make sure there was absolutely no misinterpretation of what I was
comparing/assigning.

Hey, worx for me...

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87024 From: "A.Politz" <politza@...>
Date: Fri Feb 1, 2008 8:02 pm
Subject: Re: vim7 xml/docbook spellcheck : comments only ?
politza@...
Send Email Send Email
 
haron wrote:

>Aha ":redraw" - thats were missing part !
>
>I have tried ":syn spell toplevel" already before, really !
>
>BTW, on both my windows / linux boxes ":redraw" seams not to work
>(both are running gvim 7.1, linux is huge GTK2 version), but 2<C-F>2<C-
>B> does the magic - so your main idea were completely correct :)
>
>Thanks !
>>
>
>
<C-L> works for me and is what I was actually going to suggest.

-ap

--
Ich hab geträumt, der Krieg wär vorbei.


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87025 From: Szabolcs <szhorvat@...>
Date: Fri Feb 1, 2008 10:20 pm
Subject: Re: matchit: problem when matching end of function in matlab
szhorvat@...
Send Email Send Email
 
On Feb 1, 3:55 pm, seth <vim_3...@...> wrote:
>
> i want to use "matchit" to match begin and end of functions in matlab.
> the begin is indicated by keyword "function". the end is implicitly
> defined by next occurrence of "function" or end-of-file, whatever comes
> first. example:

This is not entirely correct ...

A function can be terminated with "end", and nested functions are
legal:

function y = myfun(x)

     function h = g(k)
         h = k*k;
     end

y = g(x);

end
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87026 From: seth <vim_3468@...>
Date: Fri Feb 1, 2008 10:48 pm
Subject: Re: matchit: problem when matching end of function in matlab
vim_3468@...
Send Email Send Email
 
hi!

Szabolcs wrote:
> On Feb 1, 3:55 pm, seth <vim_3...@...> wrote:
>
>> i want to use "matchit" to match begin and end of functions in
>> matlab. the begin is indicated by keyword "function". the end is
>> implicitly defined by next occurrence of "function" or end-of-file,
>> whatever comes first. [...]
>
> This is not entirely correct ...
>
> A function can be terminated with "end", and nested functions are
> legal:
>
> function y = myfun(x)
>
> function h = g(k) h = k*k; end
>
> y = g(x);
>
> end

of course.
you did not read my whole message. i wrote:
>> in matlab every function may be ended by "end", but it many cases
>> this "end" may be omitted. but this is something i want to examine
>> later on.

i just wanted to simplify my question as much as possible. and so the
answer of A.Politz was the clarification i needed.

prosit
seth

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87027 From: Mick Charles Beaver <myheartinamerica@...>
Date: Fri Feb 1, 2008 11:29 pm
Subject: vertical ruler
myheartinamerica@...
Send Email Send Email
 
Hello,

Is it possible to create a vertical ruler in Vim? Basically, I'd like
a dotted line at column 80, like in the NetBeans editor.

Thanks,
Mick

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87028 From: Tim Chase <vim@...>
Date: Fri Feb 1, 2008 11:41 pm
Subject: Re: vertical ruler
vim@...
Send Email Send Email
 
> Is it possible to create a vertical ruler in Vim? Basically, I'd like
> a dotted line at column 80, like in the NetBeans editor.


Heh, for some reason when I read the first part, I thought you
were asking for a vertical ruler to note how far down in your
file you are...those are called line-numbers... :)

Anyways...

I don't believe there's a such an item per-se, but you can do
something like

   :match Error /\%>79v/

which will highlight anything that extends beyond column 79.  I
use this regularly to keep my line-lengths in check.

-tim



--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87029 From: Mick Charles Beaver <myheartinamerica@...>
Date: Fri Feb 1, 2008 11:45 pm
Subject: Re: vertical ruler
myheartinamerica@...
Send Email Send Email
 
Picture of NetBeans editor:
http://www.8mobile.org/blog/images/netbeans.jpg
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87030 From: Tony Mechelynck <antoine.mechelynck@...>
Date: Sat Feb 2, 2008 1:32 pm
Subject: Re: Ctrl-T mapped to Toggle()
antoine.mechelynck@...
Send Email Send Email
 
Volker Glave wrote:
> There's a toggle.vim plugin here doing mappings
> | 46 imap <S-C-T> <C-O>:call Toggle()<CR>
> | 47 nmap <S-C-T> :call Toggle()<CR>
>
> But instead as it seems the mapping goes to <C-T> ...
> | :map <S-C-T>
> | n  <C-T>         :call Toggle()<CR>
> ... so I'm losing default Ctrl-T (Jump to older entry in the
> tag stack).
>
> So, are S-C-mappings in general getting reshaped to
> C-mappings?
> Hm, from todo.txt:
> "8   Should mapping <C-A> and <C-S-A> both work?"
>
> More interestingly, what's the best way for me to
> revert to normal C-T behaviour?
> Should I unmap C-T in vimrc?
> Should I disable toggle.vim plugin? How? Assume
> that I don't have change/write access to the plugin
> directory.
>
> I'm using
> | version 7.0.224
> | :ver
> | VIM - Vi IMproved 7.0 (2006 May 7, compiled May  1 2007 10:53:35)
> | MS-Windows 32 bit console version
> | Included patches: 1-224
>
> Thanks in advance!
> Volker

IIUC, when x is a letter, C-x is represented as (x and 0x1F) regardless of
whether x is upper- or lower-case: Ctrl-a and Ctrl-A are both 0x01, Ctrl-b and
Ctrl-B are both 0x02, etc., so, yes, S-C-mappings *for letters* are the same
as C-mappings. It's not really Vim's fault, it's (IIRC) part of the ASCII
specification. For non-printing keys (such as arrow keys and F keys) it's
different. For non-letter printing keys, I'm not sure.

If you want to keep the special Ctrl-T mapping, you can always map the default
Ctrl-T function by using (for instance) ":noremap <F2> <C-T>"

In general, when creating "custom" mappings in Vim, it's best to stay away
from printing keys and cursor movement keys (with or without Shift and/or
Ctrl) because most of these are already taken. I recommend using F keys (with
or without Shift, and possibly excepting F1=Help and F10=Menu) as your best
bets for "user" mappings; or multikey mappings starting with <Leader> or
<LocalLeader> (q.v.) if you're writing a general-use plugin.


Best regards,
Tony.
--
A pretty young maiden from France
Decided she'd "just take a chance."
	 She let herself go
	 For an hour or so
And now all her sisters are aunts.


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87031 From: "Richard Hartmann" <richih.mailinglist@...>
Date: Sat Feb 2, 2008 4:39 pm
Subject: Re: Ctrl-T mapped to Toggle()
richih.mailinglist@...
Send Email Send Email
 
On Feb 2, 2008 2:32 PM, Tony Mechelynck <antoine.mechelynck@...> wrote:

> I recommend using F keys (with
> or without Shift, and possibly excepting F1=Help and F10=Menu) as your best
> bets for "user" mappings;

Setting pastetoggle to F1 was the best thing I ever did :)


SCNR,
Richard

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87032 From: "Richard Hartmann" <richih.mailinglist@...>
Date: Sat Feb 2, 2008 4:41 pm
Subject: Re: Marilyn Stovall/MDACC is out of the office.
richih.mailinglist@...
Send Email Send Email
 
On Feb 2, 2008 2:33 PM,  <mstovall@...> wrote:
>
> I will be out of the office starting  02/01/2008 and will not return until
> 02/04/2008.
>
> I will respond to your message when I return.  For immediate assistance,
> please contact bpylate@...
>
>
>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87033 From: Tony Mechelynck <antoine.mechelynck@...>
Date: Sat Feb 2, 2008 4:50 pm
Subject: Re: Marilyn Stovall/MDACC is out of the office.
antoine.mechelynck@...
Send Email Send Email
 
Richard Hartmann wrote:
> On Feb 2, 2008 5:41 PM, Richard Hartmann <richih.mailinglist@...> wrote:
>> On Feb 2, 2008 2:33 PM,  <mstovall@...> wrote:
>>> I will be out of the office starting  02/01/2008 and will not return until
>>> 02/04/2008.
>>>
>>> I will respond to your message when I return.  For immediate assistance,
>>> please contact bpylate@...
>
> Argh, sorry, I clicked the wrong button and hit ESC too late to stop GMail
> from sending this empty reply to the list. And that in a mail where I wanted
> to talk about useless messages filling up mailboxes :/
>
> Would adopting a policy to remove all addresses that send auto-replies to
> the VIM lists make sense to people on this list? In my list experience, this
> is the _only_ way to make people stop using crappy autoresponders. Or,
> if they really feel the need to use one, set them up to detect X-List*
Headers..
>
>
> Richard

About why autoresponders are bad and how to avoid them, see
http://www.spamcop.net/fom-serve/cache/329.html


Best regards,
Tony.
--
"Why was I born with such contemporaries?"
		 -- Oscar Wilde


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87034 From: Bram Moolenaar <Bram@...>
Date: Sat Feb 2, 2008 6:18 pm
Subject: Re: "Hanging" cursor color in xterm
Bram@...
Send Email Send Email
 
A.Politz wrote:

> I am writing some sort of plugin, which involves
> placing some signs. After vim has drawn the signletter
> ,the cursor stays in the color of the sign-HLGroup, until
> it is moved or a redraw! is invoked. I'd like to avoid that,
> but have no idea how, especially without triggering an
> autocommand. Any ideas ?

Sounds like a bug.  Can you give a minimal example of how to reproduce
this?

--
Never under any circumstances take a sleeping pill
and a laxative on the same night.

  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87035 From: "key.vim@..." <key.vim@...>
Date: Sat Feb 2, 2008 9:00 pm
Subject: Automatically reload file on change
key.vim@...
Send Email Send Email
 
Hi,

I have the following problem: Working on C++ code, I use test cases
for my software. So every time I compile, the test log changes. In
vim, I have that open, and would like to have it reloaded
automatically, when I switch to the buffer with the test log, without
VIM asking me.

Cheers,
Keyan

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87036 From: mathneuro <mathneuro@...>
Date: Sat Feb 2, 2008 9:13 pm
Subject: Compiling LaTeX within vim - Two Questions
mathneuro@...
Send Email Send Email
 
Hello,

I currently have the following lines in my .vimrc:

map ,p :!pdflatex % &
map ,b :!bibtex % &
map ,v :!open %<.pdf &
map ,t :w !pdflatex % &

They serve as a very nice way to compile LaTeX docs on the fly without
leaving vim (Very useful for me). (The 'v' one for 'view' utilizes Mac
OS X's 'open' command.)

My first question is a log output formatting question. When I run
',p', vim goes temporarily to a shell and runs the command, but the
output is not very nice. The lines are all wrapped funny, something
like:

ion patterns for american, french, german, ngerman, b
                                                      ahasa, basque,
bulgarian, catalan, croatian, czech, danish, dutch, esperanto, e
                                                     stonian, finnish,
greek, icelandic, irish, italian, latin, magyar, norsk, polis
                                                    h, portuges,
romanian, russian, serbian, slovak, slovene, spanish, swedish, tur
                                                   kish, ukrainian,
nohyphenation, loaded.
          (/sw/share/texmf-dist/tex/latex/base/article.cls
                                                          Document
Class: article 2004/02/16 v1.4f Standard LaTeX document class
                                                n(/sw/share/texmf-dist/
tex/latex/base/size12.clod) t)
                     (/sw/share/texmf-dist/tex/latex/preprint/
fullpage.sty) (./hk1.aux)o  [1{/sw/var/l
                      ib/texmf/fonts/map/pdftex/updmap/pdftex.mapcon}]
(./hk1.aux) )</sw/share/texmf-dis
                        t/fonts/type1/bluesky/cm/cmr8.pfbt></sw/share/
texmf-dist/fonts/type1/bluesky/cm/
                        cmsy10.pfbi></sw/share/texmf-dist/fonts/type1/
bluesky/cm/cmmi8.pfb>n</sw/share/te
                         xmf-dist/fonts/type1/bluesky/cm/cmmi12.pfb>u</
sw/share/texmf-dist/fonts/type1/bl
                         uesky/cm/cmr12.pfb>e</sw/share/texmf-dist/
fonts/type1/bluesky/cm/cmbx12.pfb>
                     Output written on
incredibly_important_monograph.pdf (1 page, 24269 bytes).

Transcript written on incredibly_important_monograph.log.

This is tough to read and quickly troubleshoot when there is an error
of any kind. I was wondering if anyone knew of a way to fix that. This
happens in xterm (under X11) running 80 lines width.

The second question is also regarding these key bindings. I would like
to have ',p' SAVE the current file and then run the !pdflatex command
on it. Is there any way to modify the above keybinding to do so?

Thanks to all.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87037 From: Andreas Müller <andrmuel@...>
Date: Sat Feb 2, 2008 9:31 pm
Subject: Re: Automatically reload file on change
andrmuel@...
Send Email Send Email
 
Hello


> I have the following problem: Working on C++ code, I use test cases
> for my software. So every time I compile, the test log changes. In
> vim, I have that open, and would like to have it reloaded
> automatically, when I switch to the buffer with the test log, without
> VIM asking me.

:set autoread

should do the trick.

Regards, Andreas

#87038 From: Andreas Müller <andrmuel@...>
Date: Sat Feb 2, 2008 9:49 pm
Subject: Re: Compiling LaTeX within vim - Two Questions
andrmuel@...
Send Email Send Email
 
Hello ...

> I currently have the following lines in my .vimrc:
>
> map ,p :!pdflatex % &
> map ,b :!bibtex % &
> map ,v :!open %<.pdf &
> map ,t :w !pdflatex % &
>
> They serve as a very nice way to compile LaTeX docs on the fly without
> leaving vim (Very useful for me). (The 'v' one for 'view' utilizes Mac
> OS X's 'open' command.)
>
> My first question is a log output formatting question. When I run
> ',p', vim goes temporarily to a shell and runs the command, but the
> output is not very nice. The lines are all wrapped funny, something
> like:
>
> [...]
>
> This is tough to read and quickly troubleshoot when there is an error
> of any kind. I was wondering if anyone knew of a way to fix that. This
> happens in xterm (under X11) running 80 lines width.

I use grep to remove everything that I don't want, and the
file-line-error switch of pdflatex to easily recognize everything I
want. From my vimrc:

setlocal makeprg=pdflatex\ \-file\-line\-error\
\-interaction=nonstopmode\ $*\\\|\ grep\ \-E\ '\\w+:[0-9]{1,4}:\\\ '
setlocal errorformat=%f:%l:\ %m
map <buffer> <F3> :w<CR>:make %<<CR>
map <buffer> <F4> :!acroread %<.pdf &<CR>

(the first who lines should be on one line ..)

Its a bit radical and ugly, but it works ...

The advantage of using makeprg is that you can use quickfix to jump
between errors, e.g. I use the mappings

map <F9> :cprev<CR>
map <F10> :cnext<CR>
map <F11> :clist<CR>

Btw, Vim has some support for compiling tex documents, I think something
like

let b:tex_flavor = 'pdflatex'
compiler tex

could be used (see :help compiler-tex). I think I didn't like it for
some reason.

> The second question is also regarding these key bindings. I would like
> to have ',p' SAVE the current file and then run the !pdflatex command
> on it. Is there any way to modify the above keybinding to do so?

Something like

map ,p :w<CR>:!pdflatex % &<CR>

should work ...

Regards, Andreas

#87039 From: Bernhard Walle <bernhard.walle@...>
Date: Sat Feb 2, 2008 10:28 pm
Subject: Re: Changing cursor color in (non-GUI) vim
bernhard.walle@...
Send Email Send Email
 
Hello Mika,

* Mika Fischer <mf+vim@...> [2008-02-02 23:16]:
>
> is it possible to change vim's cursor color when using the terminal
> version of vim?

I think this is not possible. You have to change the cursor color in
the terminal application. Which terminal do you use? For example it's
simple to change the cursor color in xterm by setting a X
ressource (in the file ~/.Xdefaults or ~/.Xresources):

     XTerm*cursorColor: #FFFF42

Or for rxvt-unicode:

     URxvt.cursorColor: darkblue

GNOME and KDE should have GUI settings.


        Bernhard
--
"Der Mensch erfand die Atombombe, doch keine Maus der Welt würde eine
Mausefalle konstruieren."
         -- Albert Einstein

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87040 From: BartlebyScrivener <bscrivener42@...>
Date: Sun Feb 3, 2008 12:41 am
Subject: Re: Compiling LaTeX within vim - Two Questions
bscrivener42@...
Send Email Send Email
 
On Feb 2, 3:49 pm, Andreas Müller <andrm...@...> wrote:

> Btw, Vim has some support for compiling tex documents, I think something
> like
>
> let b:tex_flavor = 'pdflatex'
> compiler tex

Thanks for the tips and mappings.

I'm still pretty new to LaTeX. What is the advantage of pdflatex over
dvipdf?

Thanks

RD

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87041 From: "Matt Wozniski" <mjw@...>
Date: Sun Feb 3, 2008 3:50 am
Subject: Re: Automatically reload file on change
mjw@...
Send Email Send Email
 
On Feb 2, 2008 4:31 PM, Andreas Müller wrote:
> Hello
>
> > I have the following problem: Working on C++ code, I use test cases
> > for my software. So every time I compile, the test log changes. In
> > vim, I have that open, and would like to have it reloaded
> > automatically, when I switch to the buffer with the test log, without
> > VIM asking me.
>
> :set autoread
>
> should do the trick.
>
> Regards, Andreas

I, personally, would hate to have that setting on - I like that if a
file accidentally gets modified outside of vim, I can always just
write out the buffer the way I meant to have it - or selectively merge
in changes on my own.  But, in this particular case (a constantly
changing test log), I can see the appeal.  So, I would suggest doing
it only specific file names, something in .vimrc like:

augroup vimrcAu
   au!
   au BufEnter,BufNew Test.log setlocal autoread
augroup END

Just my $0.02

~Matt

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87042 From: Tony Mechelynck <antoine.mechelynck@...>
Date: Sun Feb 3, 2008 8:24 am
Subject: Re: Automatically reload file on change
antoine.mechelynck@...
Send Email Send Email
 
Eric Tetz wrote:
> On Feb 2, 2008 7:50 PM, Matt Wozniski <mjw@...> wrote:
>> I would suggest doing it only specific file names,
>> something in .vimrc like [snip]
>
> Better yet, just do it in the specific buffer. Just takes a second to
> type ":set ar".  I use this all the time, mostly for piping script
> output into a Vim window.
>
> Cheers,
> Eric

If you want to apply it only to the specific buffer, then use

	 :setlocal autoread

or in short

	 :setl ar

(":set" sets it globally).

You can also set it for all edits of one particular file by means of a
|modeline| e.g.

vim: autoread

near the top or bottom of the file.


Best regards,
Tony.
--
         In war we're tough and able.
         Quite indefatigable
         Between our quests
         We sequin vests
         And impersonate Clark Gable
         It's a busy life in Camelot.
         I have to push the pram a lot.
                   "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87043 From: Mika Fischer <mf+vim@...>
Date: Sun Feb 3, 2008 9:52 am
Subject: Re: Changing cursor color in (non-GUI) vim
mf+vim@...
Send Email Send Email
 
* Bernhard Walle <bernhard.walle@...> [2008-02-02 23:29]:
> * Mika Fischer <mf+vim@...> [2008-02-02 23:16]:
> > is it possible to change vim's cursor color when using the terminal
> > version of vim?
>
> I think this is not possible. You have to change the cursor color in
> the terminal application. Which terminal do you use? For example it's
> simple to change the cursor color in xterm by setting a X
> ressource (in the file ~/.Xdefaults or ~/.Xresources):
>
>     XTerm*cursorColor: #FFFF42

Ah, thanks for the hint. This almost works, in that it works for every
cursor color except Black (I'm using a black on white terminal). When I
set cursorColor to Black, it behaves just as before, always reversing
foreground and background. A simple workaround is to use Gray1, which is
almost black.

> GNOME and KDE should have GUI settings.

Actually I'm using gnome-terminal, but the cursor color is not
configurable there. Maybe I'll switch to xterm. The one thing that keeps
me using gnome-terminal is that I can right-click on links and open them
in my browser, which I use extensively and would miss in xterm.

I guess you just can't have everything...

Thanks a lot for the info!

Best regards,
  Mika

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87044 From: Ciccio Bodoni <ciccio.bodoni@...>
Date: Sun Feb 3, 2008 2:12 pm
Subject: File encoding & line ending in Vim
ciccio.bodoni@...
Send Email Send Email
 
Hi, I'm using gvim in Italian on Windows XP SP2 (Italian + Italian
keyboard) with the Consolas font. At my workplace all other developers
have Textmate for Mac OS X. To avoid any encoding issue we decided
that:

- the default file encoding has to be UTF-8
- the default line ending has to be LF

(In fact these are the default settings in Textmate)

Now I have to build a gvimrc file so that:

- I can read, edit and save every file from Textmate (UTF-8 + LF)
- all new files I create are UTF-8 + LF

I'm a newbie so any help is appreciated. Thanks in advance.

CB
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87045 From: "A.Politz" <politza@...>
Date: Sun Feb 3, 2008 3:25 pm
Subject: [OT]Re: Changing cursor color in (non-GUI) vim
politza@...
Send Email Send Email
 
Mika Fischer wrote:

>
>
>Just for the archives. A good alternative seems to be xfce4-terminal,
>which has the functionality of gnome-terminal but can be customized
>more, including the ability to set the cursor color.
>
>
>
>
Is gnome-terminal still slow as hell ?

-ap

--
Ich hab geträumt, der Krieg wär vorbei.


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87046 From: Ben Schmidt <mail_ben_schmidt@...>
Date: Sun Feb 3, 2008 2:58 pm
Subject: Re: File encoding & line ending in Vim
mail_ben_schmidt@...
Send Email Send Email
 
Ciccio Bodoni wrote:
> Hi, I'm using gvim in Italian on Windows XP SP2 (Italian + Italian
> keyboard) with the Consolas font. At my workplace all other developers
> have Textmate for Mac OS X. To avoid any encoding issue we decided
> that:
>
> - the default file encoding has to be UTF-8
> - the default line ending has to be LF
>
> (In fact these are the default settings in Textmate)
>
> Now I have to build a gvimrc file so that:
>
> - I can read, edit and save every file from Textmate (UTF-8 + LF)
> - all new files I create are UTF-8 + LF
>
> I'm a newbie so any help is appreciated. Thanks in advance.

Piece of cake!

In (g)vim, find out where your home directory is by issuing

:echo $HOME

Then create a file in that directory called _vimrc and put this in it:

set encoding=utf8
set ffs=unix,dos

Apart from those two, I believe all the Vim defaults will suit your needs. For
more info on these options, see

:help 'encoding'
:help 'fileformats'

Hope this helps. Let us know if you need further help.

Ben.




Send instant messages to your online friends http://au.messenger.yahoo.com


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87047 From: Tony Mechelynck <antoine.mechelynck@...>
Date: Sun Feb 3, 2008 3:15 pm
Subject: Re: File encoding & line ending in Vim
antoine.mechelynck@...
Send Email Send Email
 
Ciccio Bodoni wrote:
> Hi, I'm using gvim in Italian on Windows XP SP2 (Italian + Italian
> keyboard) with the Consolas font. At my workplace all other developers
> have Textmate for Mac OS X. To avoid any encoding issue we decided
> that:
>
> - the default file encoding has to be UTF-8
> - the default line ending has to be LF
>
> (In fact these are the default settings in Textmate)
>
> Now I have to build a gvimrc file so that:
>
> - I can read, edit and save every file from Textmate (UTF-8 + LF)
> - all new files I create are UTF-8 + LF
>
> I'm a newbie so any help is appreciated. Thanks in advance.
>
> CB

By default, Vim will detect the kind of line endings used on existing files
and respect it; for new files or if you want to change the EOL for a given
files, you can specify it by ":setlocal fileformat=unix". See for more details:

	 :help 'fileformats'
	 :help 'fileformat'
	 :help ++opt

and what they resend to.

For using UTF-8 with Vim, see among others
http://vim.wikia.com/wiki/Working_with_Unicode

Note that for UTF-8 files meant to be read on XP by Windows software, it is
often useful to use ":setlocal bomb" so that the file starts with a BOM: for
instance, when I was on XP SP2, I noticed that WordPad can read UTF-8 files if
they have a BOM, but when saving "Unicode" files, what it produces is UTF-16le
with BOM (which, BTW, Vim can also read; see the above-mentioned links).

So here is an example of what your vimrc might look like (feel free to make
changes). Lines starting with a double quote are comments.




" Vim configuration file

" Uncomment the following to force English menus and messages
if 0
	 if has("unix")
		 language messages C
	 else
		 language messages en
	 endif
endif

" Set various useful settings
runtime vimrc_example.vim

" We want to use Unicode files: can we use multibyte encodings?
if has("multi_byte")
	 " is the default locale already a Unicode one? if not, set UTF-8
	 if &enc !~? '^u'
		 " avoid clobbering the keyboard encoding
		 if &tenc == ""
			 let &tenc = &enc
		 endif
		 set enc=utf-8
	 endif
	 " define heuristics for encoding detection in existing files
	 " ucs-bom (if present) must be first
	 " there can be at most one 8-bit encoding (e.g. Latin1) and
	 " it must come last
	 set fencs=ucs-bom,utf-8,latin1
	 " set encoding & BOM for newly created files
	 setglobal bomb fenc=utf-8
	 " create new files with Unix (LF) EOL by default
	 set fileformats=unix,dos,mac
	 setglobal fileformat=unix
	 " warning! fileformats (plural) != fileformat (singular)
else
	 echoerr "Error= multi-byte disabled at compile time in this Vim"
	 finish
endif

" uncomment the following line to disable filetype-specific indenting
" filetype indent off

" if in gvim, set the font: 5 possible formats, each version of gvim accepts
" only one of them
if has("gui_running")
	 if has("gui_gtk2")
		 set gfn=Courier\ New\ 10
	 elseif has("gui_photon")
		 set gfn=Courier\ New:s10
	 elseif has("gui_kde")
		 set gfn=Courier\ New/10/-1/5/50/0/0/0/1/0
	 elseif has("x11")
		 set gfn=*-courier-medium-r-normal-*-*-100-*-*-m-*-*
	 else
		 set gfn=Courier_New:h10:cDEFAULT
	 endif
" if gvim, start maximized
	 set lines=99999 columns=99999
endif

" Rolodex vim: make the current window as high as possible,
" reduce all other windows to just a status line
set wmh=0 wh=99999

" add additional customizations here




Best regards,
Tony.
--
When a fly lands on the ceiling, does it do a half roll or a half
loop?


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

#87048 From: thomas <micathom@...>
Date: Sun Feb 3, 2008 3:18 pm
Subject: Re: (La)TeX symbol preview
micathom@...
Send Email Send Email
 
> I was wondering if there is a way to have in gvim menus a kind of preview
> of what a symbol looks like, when editing a latex file.

I don't use the vim-latex Suite but maybe you could use :menutranlate
for this. E.g.

menutranlate Latex\.Symbols\.Pi Latex\.Symbols\.¶

You'd still have to translate all menus though and source them at the
right moment.

Regards,
Thomas.

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Messages 87019 - 87048 of 138223   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help