Quantcast

line number non copyable

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

line number non copyable

statquant2
Hi guys,
silly question, is it possible to set the line numbers such that you cannot copy them ?
I like to have the line number but I am fed up with having to set nonu each time I want to copy with the mouse.
In most editors I know, line numbers are visible but you cannot copy them ...

Hope I have been clear enough.
Thanks for reading

Cheers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: line number non copyable

John Beckett-2
statquant2 wrote:
> silly question, is it possible to set the line numbers such
> that you cannot copy them ?
> I like to have the line number but I am fed up with having to
> set nonu each time I want to copy with the mouse.
> In most editors I know, line numbers are visible but you
> cannot copy them ...

Presumably you are using console/terminal Vim, and the mouse
copying that you refer to is NOT done by Vim, but is done by the
shell.

One solution would be to use gvim (GUI Vim), and use its ability
to copy with the mouse. Another approach for any Vim compiled
with clipboard support would be to copy using Vim's commands:

"+yip
    copy inner paragraph to clipboard

:12,345y +
    copy lines 12..345 inclusive to the clipboard

John

--
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: line number non copyable

John Little-4
In reply to this post by statquant2
On Nov 1, 11:55 pm, statquant2 <[hidden email]> wrote:
> is it possible to set the line numbers such that you cannot
> copy them ?

Sounds like you are running vim in a terminal emulator, which is
handling your mouse selection.  You could use gvim, or try

:set mouse=a

Then vim gets mouse clicks and some useful stuff works, like
positioning the cursor with the mouse; there's lots you can do, I
suggest a read of

:help mouse-using

"Currently the mouse is supported for Unix in an xterm window, in a
*BSD
console with sysmouse, in a Linux console (with GPM), for
MS-DOS and in a Windows console."

Regards, John

--
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: line number non copyable

statquant2
Hello JohnS
Thank you for your messages, I am already doing what you are suggesting (not using gvim though)
Thanks for the insight

Cheers
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: line number non copyable

Gestorm
In reply to this post by statquant2
Hi, I've written a plugin to solve this problem, see
http://www.vim.org/scripts/script.php?script_id=2963

On 11月1日, 下午6时55分, statquant2 <[hidden email]> wrote:

> Hi guys,
> silly question, is it possible to set the line numbers such that you cannot
> copy them ?
> I like to have the line number but I am fed up with having to set nonu each
> time I want to copy with the mouse.
> In most editors I know, line numbers are visible but you cannot copy them
> ...
>
> Hope I have been clear enough.
> Thanks for reading
>
> Cheers
> --
> View this message in context:http://vim.1045645.n5.nabble.com/line-number-non-copyable-tp3244877p3...
> Sent from the Vim - General mailing list archive at Nabble.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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: line number non copyable

Gestorm
In reply to this post by statquant2
Hi, I've written a plugin to solve this problem, see
http://www.vim.org/scripts/script.php?script_id=2963

On 11月1日, 下午6时55分, statquant2 <[hidden email]> wrote:

> Hi guys,
> silly question, is it possible to set the line numbers such that you cannot
> copy them ?
> I like to have the line number but I am fed up with having to set nonu each
> time I want to copy with the mouse.
> In most editors I know, line numbers are visible but you cannot copy them
> ...
>
> Hope I have been clear enough.
> Thanks for reading
>
> Cheers
> --
> View this message in context:http://vim.1045645.n5.nabble.com/line-number-non-copyable-tp3244877p3...
> Sent from the Vim - General mailing list archive at Nabble.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
Loading...