vim function for printing text in to a buffer.

2014-08-02 Thread sinbad
hi, i'm trying to write a vim function to generate the following output. first of all why is it so difficult to ptint text into the buffer, i thought vim will have a simple printf() command which can dump the text into the buffer, but after googling a lot i found that append() is the function i

RE: vim function for printing text in to a buffer.

2014-08-02 Thread John Beckett
sinbad wrote: i'm trying to write a vim function to generate the following output. first of all why is it so difficult to ptint text into the buffer, i thought vim will have a simple printf() command which can dump the text into the buffer, but after googling a lot i found that append() is

Re: Tab Order

2014-08-02 Thread Paul
On Wednesday, 30 July, 2014 at 20:20:38 BST, mMontu wrote: augroup FocusOnTabClose au! au TabLeave * call TabCloseLeave() au TabEnter * call TabCloseEnter() augroup END function! TabCloseLeave() Vim default behavior is fine for the first and the last tab if tabpagenr() != 1

Re: vim function for printing text in to a buffer.

2014-08-02 Thread sinbad
Thanks for the reply, that did the trick, i was expanding on the program, now i'm hitting the following issue, when i run the following program, i'm getting these errors. and also for the 'fmt' whats the difference between ' ' and ?, for the first printf at 4, it works only if i use ' ' E116:

Re: vim function for printing text in to a buffer.

2014-08-02 Thread Павлов Николай Александрович
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On August 2, 2014 4:51:41 PM GMT+03:00, sinbad sinbad.sin...@gmail.com wrote: Thanks for the reply, that did the trick, i was expanding on the program, now i'm hitting the following issue, when i run the following program, i'm getting these errors.

Re: Backslash after line continuation causes error in gvim

2014-08-02 Thread klo uo
Yes, that was the problem. It was my first day with Vim. Thanks -- -- You received this message from the vim_use maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because

Duplicate line without losing unnamed register?

2014-08-02 Thread Saad Malik
Hi All, This is a ViM ninja question. What is the most efficient way of duplicating a line without overwriting the unnamed register? For example, imagine the following two lines in a buffer: this_is_a_really_long_word bean id=duplicate_this_line class=... scope=prototype / What'd I'd like to

Re: Duplicate line without losing unnamed register?

2014-08-02 Thread Tim Chase
On 2014-08-02 10:28, Saad Malik wrote: Hi All, This is a ViM ninja question. What is the most efficient way of duplicating a line without overwriting the unnamed register? I tend to use :t. to copy the current line to the line below it without messing up my scratch register. You can

Re: Duplicate line without losing unnamed register?

2014-08-02 Thread Saad Malik
On Saturday, August 2, 2014 10:51:43 AM UTC-7, Tim Chase wrote: On 2014-08-02 10:28, Saad Malik wrote: Hi All, This is a ViM ninja question. What is the most efficient way of duplicating a line without overwriting the unnamed register? I tend to use :t. Now this is cool!

Re: Inputdialog - Aligning

2014-08-02 Thread rameo
On Sunday, July 27, 2014 11:51:30 AM UTC+2, rameo wrote: I noted that Vim uses the proportional windows default font for his inputdialog text. (The same font as the gvim menu font) If I create an inputdialog like this: Let question = Which formatting? \ \n \ \n1) %.2f --

external command not using current directory

2014-08-02 Thread Wis Macomson
What I want is for external commands (:!) to run in the current directory. With autochdir, that should be the directory where my file is, right? If I :cwd, I get the expected current directory. If I !!ls, I do not get the expected contents of the current directory, rather, the directory two

Re: external command not using current directory

2014-08-02 Thread Tony Mechelynck
On 03/08/14 05:11, Wis Macomson wrote: What I want is for external commands (“:!”) to run in the current directory. With “autochdir”, that should be the directory where my file is, right? If I “:cwd”, I get the expected current directory. If I “!!ls”, I do not get the expected contents of the

Re: vim function for printing text in to a buffer.

2014-08-02 Thread Ben Fritz
On Saturday, August 2, 2014 4:48:42 AM UTC-5, sinbad wrote: hi, i'm trying to write a vim function to generate the following output. first of all why is it so difficult to ptint text into the buffer, i thought vim will have a simple printf() command which can dump the text into the buffer,