Re: cal in a doc

2012-09-10 Thread William Robertson
On Monday, September 10, 2012 2:45:48 AM UTC+1, Tim Chase wrote:
 On 09/09/12 20:43, Bee wrote:
 
  cal in a doc
 
  From within terminal vim I can issue the command:
 
  !cal
 
  and it will display the current month.
 
  How can I get it placed in the current document?
 
 
 
 
 
   :r! cal
 
 
 
 which you can read about at
 
 
 
   :help :r!
 
 
 
 -tim

Interesting - I've always used !! (possibly that's from classic vi), as in

!!cal

which I see Vim translates into

:.!cal

-- 
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


VIM Syntax Highlighting - new vim does it wrong?

2012-09-10 Thread ChLange
Hi there,

I am using VIM 7.3 on my new development PC. On the old one, I used VIM 7.0. 
But something has changed in syntax highlighting (see 
https://www.dropbox.com/s/hd3skcnidhbb89b/vim_colors.png). Till now, I only 
recognized this when programming in HTML/Mason. The new VIM puts a red 
background to the beginning of every line which begins with an if statement. 
This is pretty confusing. The old one didn't do this.
Using Kompare, I verified that the syntax definition file is the same on VIM 
7.3 and VIM 7.0, so this must be caused by something else. Does someone have a 
hint?

Another question: My Cursor is hidden when moving (for example, holding down on 
of the arrow keys). It's visible again when the movement stops. But again, this 
seems only to be a with HTML/Mason. In pure Perl scripts, this is not a problem.

-- 
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


Re: Apply different setting to file belonging to a perticular location

2012-09-10 Thread Jean-Michel Pichavant

ansuman wrote:
Hi 


I work with python.

I want to use 4 space indentation personally for python files created by me
(not associated with project). I know I can achieve this by:
set ts=4 sts=4 sw=4 expandtab.

Now the twist is that I am having a project folder always at
D:\Projects\MyProject . The python file in the project has used 3 space
indentation. 


How can I provide a local setting for my project files?

Please help. Any suggestions and inputs will be appreciated.

Thanks
Ansuman



--
View this message in context: 
http://vim.1045645.n5.nabble.com/Apply-different-setting-to-file-belonging-to-a-perticular-location-tp5710105.html
Sent from the Vim - General mailing list archive at Nabble.com.

  

http://wiki.python.org/moin/Vim

Especially:


Indentation

A useful addition to Python source files is this comment:


# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
This may need the modeline option enabled in your ~/.vimrc file:


set modeline



Cheers,

JM

--
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


Re: cal in a doc

2012-09-10 Thread Tim Chase
On 09/10/12 02:31, William Robertson wrote:
 On Monday, September 10, 2012 2:45:48 AM UTC+1, Tim Chase wrote:
 !cal
 How can I get it placed in the current document?

   :r! cal
 
 Interesting - I've always used !! (possibly that's from classic vi), as in
 
 !!cal
 
 which I see Vim translates into
 
 :.!cal

The main problem with that is it replaces the current line's
contents with the output of cal.

  bash$ seq 20 | vi -
  5Ggo to line 5
  !!cal read in the calendar

Notice that the line containing 5 is now missing from your document.

-tim


-- 
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


Re: cal in a doc

2012-09-10 Thread sc
On Mon, Sep 10, 2012 at 05:56:52AM -0500, Tim Chase wrote:
 On 09/10/12 02:31, William Robertson wrote:
  On Monday, September 10, 2012 2:45:48 AM UTC+1, Tim Chase wrote:
  !cal
  How can I get it placed in the current document?
 
:r! cal
  
  Interesting - I've always used !! (possibly that's from classic vi), as in
  
  !!cal
  
  which I see Vim translates into
  
  :.!cal

 The main problem with that is it replaces the current line's
 contents with the output of cal.

  bash$ seq 20 | vi -
  5Ggo to line 5
  !!cal read in the calendar

 Notice that the line containing 5 is now missing from your document.

in the Who Cares!?! department we have this:  Bee might conceivably be
interested in a slightly fancier calendar, one with today's date
circled, with the time of day under it, thrown into insertmode, all
by just pressing shift-F7

of course it uses python -- not a python enabled vim, but python needs
to be available

put the following in your vimrc:

nnoremap silent S-F7 :call Acdmo()CR
inoremap silent S-F7 ESC:call Acdmo()CR

function! Acdmo()
read! ~/py/currmo 38
let im = strftime(%H:%M)
call append(line(.), )
call append(line(.), im)
call append(line(.), )
normal 3j
startinsert
endfunction

and put

https://github.com/toothpik/toothpik-s-.vimrc/blob/master/py/currmo

in your ~/py path

it makes a nice blog header IMHO

sc

-- 
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


Re: VIM Syntax Highlighting - new vim does it wrong?

2012-09-10 Thread Benjamin R. Haskell

On Mon, 10 Sep 2012, ChLange wrote:


Hi there,

I am using VIM 7.3 on my new development PC. On the old one, I used 
VIM 7.0. But something has changed in syntax highlighting (see 
https://www.dropbox.com/s/hd3skcnidhbb89b/vim_colors.png). Till now, I 
only recognized this when programming in HTML/Mason. The new VIM puts 
a red background to the beginning of every line which begins with an 
if statement. This is pretty confusing. The old one didn't do this.
Using Kompare, I verified that the syntax definition file is the same 
on VIM 7.3 and VIM 7.0, so this must be caused by something else. Does 
someone have a hint?


The problem wasn't with the Mason syntax file.  It's with the Perl 
syntax file.


Fix is at: 
https://github.com/benizi/vim-perl/commit/0ea3bdbea0f591ef78b132c72e29448673360e07
Pull request is at: https://github.com/petdance/vim-perl/pull/80


Another question: My Cursor is hidden when moving (for example, 
holding down on of the arrow keys). It's visible again when the 
movement stops. But again, this seems only to be a with HTML/Mason. In 
pure Perl scripts, this is not a problem.


(No idea on this problem, but didn't want to trim it.)

--
Best,
Ben

--
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


understanding v_p when cb=unnamed on Gvim

2012-09-10 Thread Alexandre Provencio
Hello guys,

I would like to know why Gvim is not replacing the selected text with
the contents of the register. This does not happen with regular Vim or
when cb=unnamedplus or cb=unnamed,unnamedplus.

What I'm doing is using the unnamed register with the usual 'y' and
'p' not specifying it directly, and:
1) yank a text
2) visual select the text to be replaced
3) put the text

As expected, the selected text goes to the unnamed register, but the
yanked text does not replace the selection which stays intact.

Vim 7.3-659, Ubuntu 12.04

-- 
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


Re: cal in a doc

2012-09-10 Thread Reid Thompson
On Mon, 2012-09-10 at 06:35 -0500, sc wrote:
 
 in the Who Cares!?! department we have this:  Bee might conceivably be
 interested in a slightly fancier calendar, one with today's date
 circled, with the time of day under it, thrown into insertmode, all
 by just pressing shift-F7
 
 of course it uses python -- not a python enabled vim, but python needs
 to be available
 
 put the following in your vimrc:
 
 nnoremap silent S-F7 :call Acdmo()CR
 inoremap silent S-F7 ESC:call Acdmo()CR
 
 function! Acdmo()
 read! ~/py/currmo 38
 let im = strftime(%H:%M)
 call append(line(.), )
 call append(line(.), im)
 call append(line(.), )
 normal 3j
 startinsert
 endfunction
 
 and put
 
  https://github.com/toothpik/toothpik-s-.vimrc/blob/master/py/currmo
 
 in your ~/py path
 
 it makes a nice blog header IMHO
 
 sc
 

:r !gcal
gives

September 2012
 Su Mo Tu We Th Fr Sa
1
  2  3  4  5  6  7  8
  91011 12 13 14 15
 16 17 18 19 20 21 22
 23 24 25 26 27 28 29
 30


-- 
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


Re: understanding v_p when cb=unnamed on Gvim

2012-09-10 Thread Ben Fritz
On Monday, September 10, 2012 8:22:33 AM UTC-5, Alexandre Provencio wrote:
 Hello guys,
 
 
 
 I would like to know why Gvim is not replacing the selected text with
 
 the contents of the register. This does not happen with regular Vim or
 
 when cb=unnamedplus or cb=unnamed,unnamedplus.
 
 
 
 What I'm doing is using the unnamed register with the usual 'y' and
 
 'p' not specifying it directly, and:
 
 1) yank a text
 
 2) visual select the text to be replaced
 
 3) put the text
 
 
 
 As expected, the selected text goes to the unnamed register, but the
 
 yanked text does not replace the selection which stays intact.
 
 
 
 Vim 7.3-659, Ubuntu 12.04

Selecting text in Linux normally will automatically place the text in the 
selection clipboard or whatever it's called, so that you can paste it with a 
middle-click of your mouse. gvim by default also does this. So, to rephrase, 
you:

1. Yank text into * register
2. Visually select text, placing it in the * register (overriding what was 
there)
3. Paste the * register

Sounds like it's doing the right thing to me.

Check to see if a is in your guioptions setting. If present, selecting text 
in visual mode in gvim will automatically place it in the * register. It sounds 
like you don't actually want this, so if you've left guioptions at the default 
(or kept a if you've modified it) then I think removing the a should allow 
gvim to act as you like.

-- 
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


Re: understanding v_p when cb=unnamed on Gvim

2012-09-10 Thread Alexandre Provencio
On Mon, Sep 10, 2012 at 12:28 PM, Ben Fritz fritzophre...@gmail.com wrote:
 On Monday, September 10, 2012 8:22:33 AM UTC-5, Alexandre Provencio wrote:
 Hello guys,



 I would like to know why Gvim is not replacing the selected text with

 the contents of the register. This does not happen with regular Vim or

 when cb=unnamedplus or cb=unnamed,unnamedplus.



 What I'm doing is using the unnamed register with the usual 'y' and

 'p' not specifying it directly, and:

 1) yank a text

 2) visual select the text to be replaced

 3) put the text



 As expected, the selected text goes to the unnamed register, but the

 yanked text does not replace the selection which stays intact.



 Vim 7.3-659, Ubuntu 12.04

 Selecting text in Linux normally will automatically place the text in the 
 selection clipboard or whatever it's called, so that you can paste it with a 
 middle-click of your mouse. gvim by default also does this. So, to rephrase, 
 you:

 1. Yank text into * register
 2. Visually select text, placing it in the * register (overriding what was 
 there)
 3. Paste the * register

 Sounds like it's doing the right thing to me.

 Check to see if a is in your guioptions setting. If present, selecting text 
 in visual mode in gvim will automatically place it in the * register. It 
 sounds like you don't actually want this, so if you've left guioptions at the 
 default (or kept a if you've modified it) then I think removing the a 
 should allow gvim to act as you like.

Exactly! Thank you Ben :)

-Alexandre

 --
 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 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


Re: cal in a doc

2012-09-10 Thread sc
On Mon, Sep 10, 2012 at 01:23:24PM +, Reid Thompson wrote:
 On Mon, 2012-09-10 at 06:35 -0500, sc wrote:
  
  in the Who Cares!?! department we have this:  Bee might conceivably be
  interested in a slightly fancier calendar, one with today's date
  circled, with the time of day under it, thrown into insertmode, all
  by just pressing shift-F7
  
  of course it uses python -- not a python enabled vim, but python needs
  to be available
  
  put the following in your vimrc:
  
  nnoremap silent S-F7 :call Acdmo()CR
  inoremap silent S-F7 ESC:call Acdmo()CR
  
  function! Acdmo()
  read! ~/py/currmo 38
  let im = strftime(%H:%M)
  call append(line(.), )
  call append(line(.), im)
  call append(line(.), )
  normal 3j
  startinsert
  endfunction
  
  and put
  
 https://github.com/toothpik/toothpik-s-.vimrc/blob/master/py/currmo
  
  in your ~/py path
  
  it makes a nice blog header IMHO
  
  sc
  

 :r !gcal
 gives

   September 2012
 Su Mo Tu We Th Fr Sa
   1
 2  3  4  5  6  7  8
 91011 12 13 14 15
 16 17 18 19 20 21 22
 23 24 25 26 27 28 29
 30

I had to install it and was slightly miffed when a man page didn't
come down with it.  Ha.  `gcal --help` showed me that `gcal -hh` gives
extended help, which knocked me out of my chair.  Wow -- this is one
full featured calendar program -- thanx Reid.

sc

-- 
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


Re: VIM Syntax Highlighting - new vim does it wrong?

2012-09-10 Thread sc
On Mon, Sep 10, 2012 at 08:59:24AM -0400, Benjamin R. Haskell wrote:
 On Mon, 10 Sep 2012, ChLange wrote:

 Another question: My Cursor is hidden when moving (for example,
 holding down on of the arrow keys). It's visible again when the
 movement stops. But again, this seems only to be a with
 HTML/Mason. In pure Perl scripts, this is not a problem.

 (No idea on this problem, but didn't want to trim it.)

Being the fearless trimmer AND guesser that I am let me jump in here.

What's probably going on is your syntax script for HTML/Mason has some
look-aheads and/or look-behinds that make it just too busy to paint
while you're scrolling.  To verify try

:syntax off

and see if it persists.  This is especially likely in view of your
statement that it happens only with this type of file.

sc

-- 
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


Re: cal in a doc

2012-09-10 Thread Chris Jones
On Mon, Sep 10, 2012 at 02:46:55PM EDT, sc wrote:

[..]

 I had to install it and was slightly miffed when a man page didn't
 come down with it.  

Calendars are a complicated matter and a man page is probably not
the most suitable format.

See this instead:

http://www.gnu.org/software/gcal/manual/

Complete with glossary and three indexes.

CJ

-- 

Have a nice day!

-- 
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


bufexplorer is opening files in two windows

2012-09-10 Thread Tim Johnson
I'm using macVim 7.3.315 on Mac OSX 10.7

I have recently starting using bufexplorer. Unexpectedly bufexplorer
is opening (some but not all) files in two windows. This is deeply
unsettling and unproductive. I can't find any option in the help
feature or in bufexplorer.txt that might be causing this. 

Any help would be appreciated.

thanks
-- 
Tim 
tim at tee jay forty nine dot com or akwebsoft dot com
http://www.akwebsoft.com

-- 
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


How to execute script from cmdline without Vim window

2012-09-10 Thread Timothy Madden

Hello

I would like to execute a Vim script from the command line, for example 
to build a vimball archive from a Makefile.


But when I do that the Vim window always pops up and then immediately 
disappears (as the script completes). Even if there are errors in the 
window.


Is there a way to execute the vim script without a Vim window ? And to 
get the errors on stdout ?


Thank you,
Timothy Madden

--
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


Re: Oracle 11g SQL + PL/SQL + SQL*Plus + RDBMS syntax support

2012-09-10 Thread 葛布林
I see, and I am starting trying. Very thanks! It is much better than the
original plsql.vim.

It is very handy that the color will change from white to blue after I
close a quotation. But in my codes there are some occasions like

v_sql_where := v_sql_where ||'
 AND a.col1 = 1 ';

 with the first quotation mark at the first row while the second quotation
mark at the second row. In this condition I found it did not handle
properly.

I noticed the type of  char  would have a pink backgroud color while the
other types as  varchar2 or number still having the background stay the
same. I am wondering why char is so special...

On Sun, Sep 9, 2012 at 10:26 PM, William Robertson 
will...@williamrobertson.net wrote:

 On Wednesday, August 29, 2012 4:35:15 AM UTC+1, 葛布林 wrote:
  Hi, where can I get your script? I write PLSQL in Vim every day. I am
 willing to try your script instead.
 

 Hi Goblin :)

 I've put it at http://www.williamrobertson.net/settings/gvim-windows if
 you want to try it, along with my colorscheme etc. Let me know how you get
 on.

 William

 --
 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




-- 
Our enemy shall fall.
Death to all who oppose us!!

-- 
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