If you just want to know the current line number there are three
methods:
:echo line('.')
answers with the current line number.
Actually, I like
:.=
better 'cause it's that much less typing. :D
--~--~-~--~~~---~--~~
You received this message
by the vimrc_example.vim). With 'laststatus' set to 0 (never a bottom
status line) or 1 (only if there are at least two windows) the line and
column will still be displayed if 'ruler' is set.
Not sure what the default happens to be, but whatever it is, it's
probably set to that. Recall the
Hi Everybody,
two weeks ago I had asked how to print, say, a certain part of a
program. Tony gave the answer. Thanks! I have two related questions:
How to determine, at which line in, say, a program I'am?
How to direct the hardcopy command so that a file, say a ps file, is
created (rather
How to determine, at which line in, say, a program I'am?
:f
or
CTRL-G
or
g CTRL-G
are the ones I use.
How to direct the hardcopy command so that a file, say a ps file, is
created (rather than executing the default lpr command, when on a unix
plattform)?
:help pexpr-option
and
Hi Ben,
thanks for the try. f, ctrl-G etc. determines how many lines the
file has, not the actual line.
As for the 2nd question, I'm stuck. The help for pexpr-option refers
to cmdarg as part of the first step, that is, directing lpr to a
sort of save-as-file. Now, the help for cmdarg
Hi again!
Well, in my case f, ctrl-G etc. reports the lines the file has
plus a percentage information for the actual cursor position. The
latter allows to calculate the actual line.
As for the 2nd issue, I tried :hardcopy ~/test.ps, :hardcopy
~/test.ps etc., but my system does not dump
reviol wrote:
How to determine, at which line in, say, a program I'am?
I recently put something in From Vim Help that shows line numbers:
http://vim.wikia.com/wiki/Main_Page
* Use :set nu! to toggle the display of line numbers. :help 'number'
* Use :-5,5l# to list lines near the current line.
I believe the line number and column number are listed in the very
bottom-left corner of the interface (or individiual window, if in
split mode) by default. The C-g command then just shows you about
where that value lies in the range of the whole file.
On Mon, Nov 10, 2008 at 4:52 PM, Tim Chase