Re: Prevent from entering to insert mode before finishing mapping

2009-11-30 Thread anna klein
> It's necessary to escape "|" as in {rhs} of :map commands. > > h, now I know why. Thank you. it works. Anna -- You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php

Re: Prevent from entering to insert mode before finishing mapping

2009-11-30 Thread Kana Natsuno
Sorry for typo. Use the following instead: onoremap w :exe DoCommand() call DoSomethingElse() On Dec 1, 4:19 pm, anna klein wrote: > This gives me error E488: Trailing characters. It's necessary to escape "|" as in {rhs} of :map commands. -- You received this message from the "vim_use" m

Re: Prevent from entering to insert mode before finishing mapping

2009-11-30 Thread anna klein
This gives me error E488: Trailing characters. I don't know why I always get trailing characters error if I use "|". That's why I avoid using "|". Any more advice? Anna On Tue, Dec 1, 2009 at 2:52 PM, Kana Natsuno wrote: > > onoremap w ::exe DoCommand():call DoSomethingElse() > > onoremap w :ex

Re: Prevent from entering to insert mode before finishing mapping

2009-11-30 Thread Kana Natsuno
> onoremap w ::exe DoCommand():call DoSomethingElse() onoremap w :exe DoCommand() | call DoSomethingElse() -- You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php

Prevent from entering to insert mode before finishing mapping

2009-11-30 Thread anna
As per subject, is there a way to prevent from entering to insert mode before finishing mapping? Below is my script. There are three comands that I want to execute for one mapping. When I type command dw or pw, it works as what I want, because it stays in normal mode. However, when I type command

Re: Specify a register for a custom command

2009-11-30 Thread anna klein
> This seems petty - it's the difference between 5 keystrokes and 2, but I > use it > about 30 times a day. Can I ask what the does? I tried the code w/o > the and I can't see a difference in the functionality. > > You can find here. :h count-variable "Note: The is required to remove the line

Custom Paragraph Formatting with gq

2009-11-30 Thread Robert Chan
I have logbook entries that have the following structure: [entry title 1] Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse blandit ipsum vel elit ultrices pharetra rhoncus tellus aliquam. Donec quis dolor ac elit vestibulum rhoncus. Quisque adipiscing dolor vitae urna molestie

Re: groovy indent file?

2009-11-30 Thread Tom Link
> I would be interested in an updated groovy indent file, also. AFAIK there is no groovy indent file. I now created a proxy file that loads the java indent file instead. If you put semicolons at the end of the lines, this should be an improvement. Let's see. I guess one could modify the java file

Re: ctrl+J without adding a space

2009-11-30 Thread Gary Johnson
On 2009-11-30, KKde wrote: > > > >    :help J > >    :help gJ > > > > gJ doesn't remove the indentation space whereas J removes the > indentaion space and add's up to two spaces. Is there any command to > join two lines without any white space added in between?or a function > needs to be written

Re: ctrl+J without adding a space

2009-11-30 Thread KKde
> >    :help J >    :help gJ > gJ doesn't remove the indentation space whereas J removes the indentaion space and add's up to two spaces. Is there any command to join two lines without any white space added in between?or a function needs to be written to acheive this? Regards, Sharat -- You r

Re: groovy indent file?

2009-11-30 Thread Nathan Neff
On Mon, Nov 30, 2009 at 9:26 PM, Nathan Neff wrote: > > > On Sun, Nov 29, 2009 at 10:09 AM, Tom Link wrote: > >> Hi, >> >> Does somebody know a groovy indent file? I found a thread from 1-2 >> years ago with no satisfying answer to a similar question. Has the >> situation changed in the meantime

Re: groovy indent file?

2009-11-30 Thread Nathan Neff
On Sun, Nov 29, 2009 at 10:09 AM, Tom Link wrote: > Hi, > > Does somebody know a groovy indent file? I found a thread from 1-2 > years ago with no satisfying answer to a similar question. Has the > situation changed in the meantime? > > Tom, I would be interested in an updated groovy indent file

Re: Specify a register for a custom command

2009-11-30 Thread Nathan Neff
On Mon, Nov 30, 2009 at 9:09 PM, Nathan Neff wrote: > > > On Mon, Nov 30, 2009 at 3:36 AM, Andy Wokula wrote: > >> Nathan Neff schrieb: >> > I'm looking to create a custom command / mapping where I can use the >> > contents of a register that is specified by the user. >> > >> > Similar to how ["

Re: Specify a register for a custom command

2009-11-30 Thread Nathan Neff
On Mon, Nov 30, 2009 at 3:36 AM, Andy Wokula wrote: > Nathan Neff schrieb: > > I'm looking to create a custom command / mapping where I can use the > > contents of a register that is specified by the user. > > > > Similar to how ["x]p works. The user can press "ap and the contents of > the > > "

Re: character "\n" in SendKeys() parameter

2009-11-30 Thread anna klein
> >:exe 'let var="abc\' . 'ndef"' > > where the :execute command will put the \ and n together inside a > double-quoted string which :let will then evaluate. > > Depending on how the "sending" application represents strings, there may be > an easier way of ensuring that the \n remains two c

Re: ctrl+J without adding a space

2009-11-30 Thread Tim Chase
> That said, "ctrl+J"? Isn't that just a newline? On my keyboard, shift-J > joins two lines, adding a space between them (and trimming any leading > space that may have been on the line below). Correct -- Either the OP has a mapping, or mis-typed "shift+J"/"capital J" which does as described (joi

Re: ctrl+J without adding a space

2009-11-30 Thread Dave Land
On Nov 30, 2009, at 2:17 PM, Dominique Pellé wrote: > Peng Yu wrote: > >> I use ctrl+J to join two lines. However, there will always be a space >> added between the two lines that are joined. I'm wondering how to >> configure gvim not to add this extra space? > > See :help gJ Thanks to this ques

Re: ctrl+J without adding a space

2009-11-30 Thread Dominique Pellé
Peng Yu wrote: > I use ctrl+J to join two lines. However, there will always be a space > added between the two lines that are joined. I'm wondering how to > configure gvim not to add this extra space? See :help gJ -- Dominique -- You received this message from the "vim_use" maillist. For more

RE: vim and a different python

2009-11-30 Thread John Beckett
Kevin wrote: > I use vim with python. I also use buildout, and sometimes, > virtualenv. Is there a way to enable vim to use a different > python without recompiling? I do not think so. However, that's to have Vim use :py to run Python commands. You can always use ! to filter text using any exter

ctrl+J without adding a space

2009-11-30 Thread Peng Yu
I use ctrl+J to join two lines. However, there will always be a space added between the two lines that are joined. I'm wondering how to configure gvim not to add this extra space? -- You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php

Re: How building a List from a textfile in vimscript

2009-11-30 Thread epanda
On 30 nov, 20:46, Christian Brabandt wrote: > Hi epanda! > > On Mo, 30 Nov 2009, epanda wrote: > > > > > > > Hi, > > > I have a text file and it contains those lines > > > item1 > > item2 > > item3 > > > I would like to read this file from a vimscript and feed a List with > > all items read. > >

Re: How building a List from a textfile in vimscript

2009-11-30 Thread Christian Brabandt
Hi epanda! On Mo, 30 Nov 2009, epanda wrote: > Hi, > > I have a text file and it contains those lines > > item1 > item2 > item3 > > > I would like to read this file from a vimscript and feed a List with > all items read. > > echo myList > > ['item1','item2',''item3] > echo getline(1,'$')

How building a List from a textfile in vimscript

2009-11-30 Thread epanda
Hi, I have a text file and it contains those lines item1 item2 item3 I would like to read this file from a vimscript and feed a List with all items read. echo myList ['item1','item2',''item3] -- You received this message from the "vim_use" maillist. For more information, visit http://www.vi

Re: Set variable to shell command output

2009-11-30 Thread Gary Johnson
On 2009-11-30, Aarto Matti wrote: > Hi, > > I need to set the output from the following command to a variable: > date +%s > It's a string of 10 digits. > > I tried > let stamp = execute "!date +\%s" > but apparently "execute" doesn't return anything, besides I can't escape "%" > character which i

Re: & xmledit

2009-11-30 Thread Gary Johnson
On 2009-11-29, Andy Wokula wrote: > Tuo Pe schrieb: > > --- On Fri, 11/27/09, Andy Wokula wrote: > > > >> :let maplocalleader = ',' > >> > >> is a setting for the vimrc: controlled by the user, constant > >> throughout the session. > > > > So this means that I should use mapleader instead of m

Re: Set variable to shell command output

2009-11-30 Thread sc
On Monday 30 November 2009 11:38:26 am Aarto Matti wrote: > Hi, > > I need to set the output from the following command to a > variable: date +%s > It's a string of 10 digits. > > I tried > let stamp = execute "!date +\%s" > but apparently "execute" doesn't return anything, besides I > can't e

Set variable to shell command output

2009-11-30 Thread Aarto Matti
Hi, I need to set the output from the following command to a variable: date +%s It's a string of 10 digits. I tried let stamp = execute "!date +\%s" but apparently "execute" doesn't return anything, besides I can't escape "%" character which is treated as buffer name. -- You received this messa

Re: using a file as quickfix

2009-11-30 Thread Ben Fritz
On Nov 29, 7:14 am, Marc Chantreux wrote: > hello, > > Given a file ERR with the following content, i would like to use this > file as quickfix error list. So i tried: > > vim ERR > :cfile % > :setf python > > well ... it doesn't work. can anyone help ? > To get Vim to understand the format of

Re: Need to know how to load script in Vim

2009-11-30 Thread Ben Fritz
On Nov 29, 3:36 am, satuon wrote: > > you can get a complete list of all scripts currently sourced by > > issuing the > > >     :scriptnames > > > command -- the command to load a script is > > >     :source > > Thanks, I used that and it showed me that pythoncomplete was loaded. But I > still

Re: How to beautify/tablize some C code

2009-11-30 Thread Brett Stahlman
On Nov 29, 11:38 pm, Robert Bu wrote: > Hi, > > For example, I have some C code: > helloa; > helloab; > hellofgh; > > Is there a way to change the C code into the form, which looks like: > helloa      ; > helloab    ; > hellofgh   ; > Where the semicolon is at a "TAB" position. So that I can use

Re: Need help with folding - I'm confused

2009-11-30 Thread Ben Fritz
On Nov 29, 9:00 pm, Tim Chase wrote: > > > 1. when I open the file - it is not folded by default > > I *think* that the 'foldlevelstart' option controls this, > allowing you to set it to some ridiculously high number like 99. > >    :help 'foldlevelstart' > Yes, but there are some side-effects

How to compile with guifont ?

2009-11-30 Thread Timothy Madden
Hello I compiled vim on a debian server and installed in in my home folder (~/usr/local), but the resulting executable can see no fonts when I press Tab on :set guifont= and the default font is looking too condensed. The Edit menu has no GUI Font entry. I use ssh -Y to run gvim on my local des

syntax file bug, vim bug or feature ?

2009-11-30 Thread Frederic Hardy
Hello ! I would like to fold catch block in php file. In order to do that, i have define my own syntax file for php. But fold become available only when i move the line contain the "catch" keyword, with "dd" and "p", for example. Fold became also available if i'm put the "catch" region at top lev

Syntax file bug or vim bug ?

2009-11-30 Thread Frederic Hardy
Hello ! I would like to fold catch block in php file. In order to do that, i have define my own syntax file for php. But fold become available only when i move the line contain the "catch" keyword, with "dd" and "p", for example. Fold became also available if i'm put the "catch" region at top lev

vim and a different python

2009-11-30 Thread Kevin
I use vim with python. I also use buildout, and sometimes, virtualenv. Is there a way to enable vim to use a different python without recompiling? -- You received this message from the "vim_use" maillist. For more information, visit http://www.vim.org/maillist.php

Re: Specify a register for a custom command

2009-11-30 Thread Christian Brabandt
On Mon, November 30, 2009 9:56 am, Andy Wokula wrote: > Christian Brabandt schrieb: >> You need to expand , e.g. com! -register Foo :echo expand("") > > You were just guessing? No, I thought this would work. And a simple test case seemed to work. Oh well, sorry. regards, Christian -- You recei

Re: Specify a register for a custom command

2009-11-30 Thread Andy Wokula
Nathan Neff schrieb: > I'm looking to create a custom command / mapping where I can use the > contents of a register that is specified by the user. > > Similar to how ["x]p works. The user can press "ap and the contents of the > "a" register will be pasted. The user can just press p and the cont

Re: Specify a register for a custom command

2009-11-30 Thread Nathan Neff
On Mon, Nov 30, 2009 at 2:56 AM, Andy Wokula wrote: > Christian Brabandt schrieb: > > Hi Nathan! > > > > On Mo, 30 Nov 2009, Nathan Neff wrote: > > > >> I see that there's a "-register" option that I can use when defining > >> a custom command, but I'm having trouble understanding how to use it.

Re: Specify a register for a custom command

2009-11-30 Thread Andy Wokula
Christian Brabandt schrieb: > Hi Nathan! > > On Mo, 30 Nov 2009, Nathan Neff wrote: > >> I see that there's a "-register" option that I can use when defining >> a custom command, but I'm having trouble understanding how to use it. >> >> For example, I just want to create a command that prints out

Re: Delete weird paragraph (or "item" paragraph)

2009-11-30 Thread Raúl Núñez de Arenas Coronado
Saluton Tony :) Tony Mechelynck skribis: > On 28/10/09 11:36, Raúl Núñez de Arenas Coronado wrote: >> I use Vim to store lists of items, like the one below: >> >> - This is a think I should do, or maybe buy - Feed my cat - Tell my >> cat he is a naughty boy for having chewing up my most   expensi

Re: How to beautify/tablize some C code

2009-11-30 Thread Chris Jones
On Mon, Nov 30, 2009 at 12:38:01AM EST, Robert Bu wrote: > Hi, > > For example, I have some C code: > helloa; > helloab; > hellofgh; > > Is there a way to change the C code into the form, which looks like: > helloa ; > helloab; > hellofgh ; > Where the semicolon is at a "TAB" position.