Tuesday, March 30, 2010

Possible error with jumplist management in insert mode with

Hello,
Please do the following:
1)
gvim -u NONE file1 (cursor is on line1, column1)
/pattern1 (cursor at the beginning of pattern1)
/pattern2 (cursor at the beginning of pattern2)
CTRL-End (to go to end-of-file)

Now do CTRL-O several times. You go to pattern2, then to pattern1,
then to line1, column 1. All as expected.
CTRL-I goes to pattern1, pattern2, end-of-file (OK)

2) Now do the same in insert mode.
gvim -u NONE file1 (cursor is on line1, column1)
i (to go to insert mode)
<C-O>/pattern1 (cursor at the beginning of pattern1)
<C-O>/pattern2 (cursor at the beginning of pattern2)
CTRL-End (to go to end-of-file)

Now do "CTRL-O CRTL-O" several times. You go to pattern1, then to
line1, column1.
"CTRL-O CTRL-I" goes to pattern1, end-of-file.

Conclusion: pattern2 has vanished from the jumplist in 2).

NB: It does not occur if you repalce CTRL-End with <C-O>G in 2)
(this can be a work-around)

Best regards
Jean Johner

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

To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

Why no window-local mapping?

Hi,

I know of <buffer> local mapping and global mapping. I wonder why
there isn't a <window>/<tab> local mapping option for Vim. I use some
Vim windows/tabs exclusively for navigating quick fix lists. On those
windows, I keep <C-N> nd <C-P> globally mapped to :lnext (or :cnext)
and :lprevious. The problem with buffer-local mappings here is that
every time the list will load a new buffer which might not have this
mapping set. Had the mappings been window- or tab-local, I could have
reused the same mappings on other windows for something else - may be
page navigation.

Any reason why those are omitted, and any plans to have them in Vim?

Thanks
Jeenu

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

To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

Re: Unexpected behaviour of File browser in multi-windows environment

On Mar 29, 5:39 pm, Charles Campbell <Charles.E.Campb...@nasa.gov>
wrote:

> Please try netrw v137l.

Perfect!

> So you're a physicist -- are you working with the LHC?

I work in the French Thermonuclear Fusion lab (CEA/Cadarache) close to
future ITER site.

Best regards
Jean Johner

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

To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

Re: CTRL-C not working with gvim even after sourcing mswin.vim?!

On 30/03/10 12:21, Delyan Kalchev wrote:
> I have a bit strange problem. CTRL-C does nothing (just deselects the
> selected text and does not copy anything, and does not change the
> current content of the clipboard) when used in gvim, while CTRL-V and
> CTRL-X work just fine. When I had used gvim in the past I remember (or
> maybe I'm wrong) it has been working correctly.
> But when vim is executed in the gnome-terminal CTRL-C works perfectly
> and it is not because of any help form the gnome-terminal. I cannot
> explain it currently and can't solve it. So I need some help.
>
> I am using Ubuntu 9.10 with vim installed from the official repo:
> version 7.2.245 or as Ubuntu names it - 2:7.2.245-2ubuntu2
>
> Here is my .vimrc:
>
> set nocompatible
> source $VIMRUNTIME/mswin.vim
> behave mswin
>
> set tabstop=4
> set shiftwidth=4
> set expandtab
> set shiftround
> set hls
> set wildmenu
> set showcmd
> set showmatch
> set ignorecase
> set mouse=a
> set background=dark
>
> set list listchars=tab:»-,trail:·,extends:>,precedes:<
>
> match ErrorMsg '\%>80v.\+'
>
> let NERDTreeMouseMode=1
>
> let g:netrw_browse_split=4
> let g:netrw_hide=0
>
> And here is my .gvimrc:
>
> colorscheme desert
> set guifont=monospace\ 13
>
> Thanks
>

Using Ctrl-C, Ctrl-X and Ctrl-V for copy, cut and paste has nothing to
do with ":behave mswin" (which is just a kind of abbreviation for ":set
selectmode=mouse,key mousemodel=popup keymodel=startsel,stopsel
selection=exclusive"), it has everything to do with sourcing mswin.vim
(which you also do in your vimrc). It ought to work even in gvim, unless
something else is at work.

To see if something else is overriding mswin.vim's mapping, try

:verbose map <C-C>

in a running gvim.

In any case I don't recommend sourcing mswin.vim, which masks useful Vim
key bindings; instead, in Vim it helps to keep in mind that the
clipboard is "register-plus" and to use the following:

- To move data to and from the clipboard, for copy / cut / paste to and
from other applications:

Normal commands
"+x delete (cut) one character to the clipboard
"+d{motion} delete to the clipboard
"+dd delete <count> lines to clipboard
{Visual}"+d delete selection to clipboard
"+y{motion} yank (copy) to the clipboard
"+yy yank <count> lines to the clipboard
{Visual}"+y yank selection to clipboard
"+P put (paste) clipboard before cursor
"+p put clipboard after cursor
Ex-commands (always linewise)
:[range]yank +
:[range]delete +
:[range]put +
which can be abbreviated to :y :d and :pu respectively. For :d and :y
the [range] is the set of (consecutive) lines to be cut or copied, for
:put the [range] is the single line after which to paste (or $ for
"after last line" or 0 for "before first line" or omitted for "after
current line" etc.); or with bang (i.e. :put! +) it is the line before
which to paste.

In gvim you can also use the Edit=>Copy, Edit=>Cut and Edit=>Paste menu
items.

If you hit the colon key in Visual mode, Vim prefills the command-line
with :'<,'> which means "from first to last line of the latest Visual
selection" -- just the range that you need in this case.

To move data within a single Vim, the clipboard isn't needed (and then
it works even in the Linux console, which has no access to X): normally
one would use the "unnamed register" by omitting the "+ before Normal
commands or the + after Ex-commands. Or you can use any one of the 26
"letter registers" by replacing the plus sign by a lowercase letter, or,
for yank and delete, by an uppercase letter to append to the register
instead of replacing its contents.


Notes:
- This vimrc will give you errors if ever you try to use it in a Vim
version missing one or more of the +eval +mouse +wildmenu features, and
this gvimrc will give an error if used in a gvim with any GUI other than
GTK2; but I suppose you don't mind these limitations -- at least for now.
- If 7.2.245 is the "latest" Vim Ubuntu has to offer, then they are
taking their time upgrading: the latest "official" patchlevel is
currently 7.2.411 -- IOW you're missing almost half the bugfixes already
published for Vim 7.2; see http://ftp.vim.org/pub/vim/patches/7.2/README
for a list of what these patches are all about, and (if desired)
http://users.skynet.be/antoine.mechelynck/vim/compunix.htm for a HowTo
page about compiling Vim on Unix/Linux. Also
http://vim.wikia.com/wiki/Build_Vim_with_your_name_included which is
less detailed than the above-mentioned HowTo but has a paragraph about
building Vim on Ubuntu.


Best regards,
Tony.
--
Unfair animal names:

-- tsetse fly -- bullhead
-- booby -- duck-billed platypus
-- sapsucker -- Clarence
-- Gary Larson

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

To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

Re: Unexpected behaviour of File browser in multi-windows environment

On Mar 29, 5:39 pm, Charles Campbell <Charles.E.Campb...@nasa.gov>
wrote:

> Please try netrw v137l.

Perfect!

> So you're a physicist -- are you working with the LHC?

I work in the French Thermonuclear Fusion lab (CEA/Cadarache) close to
the future ITER site.

Best regards
Jean

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

To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

CTRL-C not working with gvim even with behave mswin?!

I have a bit strange problem. CTRL-C does nothing (just deselects the
selected text and does not copy anything, and does not change the
current content of the clipboard) when used in gvim, while CTRL-V and
CTRL-X work just fine. When I had used gvim in the past I remember (or
maybe I'm wrong) it has been working correctly.
But when vim is executed in the gnome-terminal CTRL-C works perfectly
and it is not because of any help form the gnome-terminal. I cannot
explain it currently and can't solve it. So I need some help.

I am using Ubuntu 9.10 with vim installed from the official repo:
version 7.2.245 or as Ubuntu names it - 2:7.2.245-2ubuntu2

Here is my .vimrc:

set nocompatible
source $VIMRUNTIME/mswin.vim
behave mswin

set tabstop=4
set shiftwidth=4
set expandtab
set shiftround
set hls
set wildmenu
set showcmd
set showmatch
set ignorecase
set mouse=a
set background=dark

set list listchars=tab:»-,trail:·,extends:>,precedes:<

match ErrorMsg '\%>80v.\+'

let NERDTreeMouseMode=1

let g:netrw_browse_split=4
let g:netrw_hide=0

And here is my .gvimrc:

colorscheme desert
set guifont=monospace\ 13

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

To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.

Monday, March 29, 2010

Re: No more 8-character limit?

On 29/03/10 20:30, Yakov wrote:
> On Mar 29, 5:46 pm, Tony Mechelynck<antoine.mechely...@gmail.com>
> wrote:
>> Even on later Windows systems, 8.3 names still exist because they are
>
> Are we going to rename vim to something like
> visualeditorcompatiblewithvi now ?
>
> I think the argument confuses two different things,
> (a) 8.3 limit of APIs or of filesystem, and
> (b) tendency of [unix] people to abbreviate filenames and variables
> *really short*.
>
> Beleive it or not, some people will abbreviate really short, no matter
> what's filename limit.
>

Hm, I think there's something in this argument. On Unix, long names have
been permitted since I don't know when, but what are the names used? ls
(not "directory_list": "list" would still be ambiguous), cat (not
"concat" and even less "concatenate"), mv (not "move" and even less
"rename"), cp (not "copy"), rm (not "remove" or "delete"), sed (not
"streamedit"), tar (not "tape_archiver" or even "archiver" for who uses
tapes nowadays, at least on Linux?), man (not "manual") and so on and so
forth. So Unix users have to commit to memory that, for instance, to
"rename" a file they must use the "mv" program. Now how can they
remember that? Yet they do.

On Dos/Windows, there are alias pairs: chdir = cd, mkdir = md, rmdir =
rd, del = erase, etc. So what do the overwhelming majority of the users
type in practice? Always the shorter member of the pair.

With Vim commands and options it is maybe less systematic; but after
some time, for the really much-used ones, the abbreviated name always
gets the upper hand: :e (not :edit), :w (not :write), :q (not :quit), :x
(not :exit), :au (not :autocmd), etc. For the options, which ones are
most used may vary somewhat from person to person, but when I'm typing
for myself I use gfn, enc, tenc, fenc, fencs, ff, ffs, imi, ..., even
though when I'm explaining I write about 'guifont', 'encoding',
'termencoding', 'fileencoding', 'fileencodings', 'fileformat',
'fileformats', 'iminsert', etc.


Best regards,
Tony.
--
"I had to censor everything my sons watched ... even on the Mary Tyler
Moore show I heard the word 'damn'!"
-- Mary Lou Bax

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

To unsubscribe from this group, send email to vim_use+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.