Josef Fortier | 23 Oct 19:31 2014
Picon

placeholder mapping

Does vim provide a placeholder key mapping construct, i.e. one that cannot be invoked from the keyboard?

Something like

nnoremap <cannot_be_pressed>[KEY] [STOCK_MAPPING]

It's probably not clear why I'm asking. I was trying to add ]c [c mappings for non-diff files without
stepping on the existing diff mapping. Most approaches I tried ran into various issues with global
mapping conflicts. The solution that worked for me was to map the stock behavior to a function key (which I
don't use) and set up a function where I could execute normal one or the other. This is not bad (and can be
extended) but it seems like there ought to be a behavior something like <Plug> or <Sid> for this situation.

-- 
--

-- 
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 you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

DwigtArmyOfChampions | 23 Oct 14:58 2014
Picon

shortcuts for long filenames

Oftentimes I'm opening really long filenames in command mode, for example:

:e /var/www/html/sites/all/modules/jqueryui_theme/jqueryui_theme.module

Is there a way to create aliases for this file? Or if not the whole file, how about part of the path, like
everything up to and including "modules"? That's a lot of typing!

-- 
--

-- 
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 you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Romel Khan | 23 Oct 02:49 2014
Picon
Picon

How to set vim to not display filename info when saving

When I save a file using vim, it displays the filename, number of lines and number of characters being saved.
Eg: "temp" 4L, 228C written
How can I setup vim so it doesn't display this?

-- 
--

-- 
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 you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Shahbaz Youssefi | 22 Oct 20:58 2014
Picon

FileType event not triggered for make/automake files?

I have an issue where it seems like make and automake file types don't trigger the FileType event.

I have the following line in my ~/.vimrc file:

au FileType config,vim,tex,make,sh,automake set expandtab | set shiftwidth=2 | set softtabstop=2

which correctly sets shiftwidth and softtabstop for all file types config, vim, tex and sh, but doesn't
affect files of type make and automake. I don't have any other au commands addressing make and automake separately.

Can someone verify whether this works with your vim? If not, is it a known bug?

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jan  2 2014 19:39:47)
Included patches: 1-52
Modified by pkg-vim-maintainers <at> lists.alioth.debian.org
Compiled by buildd <at> 
Huge version with GTK2-GNOME GUI.  Features included (+) or not (-):

.vimrc file can be found online at https://gist.github.com/ShabbyX/3691170

-- 
--

-- 
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 you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

(Continue reading)

DwigtArmyOfChampions | 22 Oct 14:32 2014
Picon

test if string in list

let g:pathogen_disabled = ['ack.vim', 'bufexplorer', 'ctrip.vim']

how do I check later on if 'ctrip.vim' is in the g:pathogen_disabled list?

-- 
--

-- 
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 you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

BimbaLaszlo | 22 Oct 10:09 2014
Picon

replace submatches in matchlist

Is there a good way to replace submatches in matchlist() and modify the
original line with it? I like to write a script which modifies all of the
submatches in a pattern in one step.

For example the original line is 'some AfooBar' and i like to change it to
'some CfooDar':

  let pattern = '\(A\)foo\(B\)'
  let line    = 'some AfooBar'
  let found   = matchlist( line, pattern )

The 'found' contains "['AfooB', 'A', 'B', '', '', '', '', '', '', '']". Now i
like to modify the 'line' to 'some CfooDar' so the best should be:

  let found[1] = 'C'
  let found[3] = 'D'
  let line = MATCHLIST_TO_STRING( found )

As i know it's not possible with the builtin functions, so i need to write
one. The beginning of the line is not modified till the match, thus i can copy
that part to the 'new_line':

  let new_line = strpart( line, 0, match( line, pattern ) )

But at this point i don't know how to continue. I can append the modified 'A'
immediately, because the pattern starts with it (in this example, but the user
can use any kind of pattern). But how can i find out the (offset) index of the
'foo' and the 'B'? In this example it's trivial, because there is no other
'foo' and 'B' in the line, but let see another example:

(Continue reading)

russurquhart1 | 21 Oct 19:48 2014
Picon
Picon

Fwd: Preferred vim method to put xml tags around selected text


 Hi,

At my work, i am having to put specialized xml tags around selected text. So for example i might have:

The quick brown fox, jumps over the lazy dog.

Now i would have to put:

The quick <Node arch="386, 486, 586">brown </Node> fox, jumps over the lazy dog.

What is the best/elegant way to do this in Vim?

Thanks,

Russ

-- 
--

-- 
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 you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Sergej Trupp | 20 Oct 16:24 2014
Picon

execute vim command after external command call

Hello, 

i try to execute vim command after external command. But last command is not executed. 

:b mybuf1 | r !dir | :b #

Can one help me?

-- 
--

-- 
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 you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

boss | 17 Oct 09:17 2014

How to prevent cursor briefly jumping to top of file on 'edit'?

Hello!

Here's my problem:

1. Open a file in vim which is larger than the window.
2. Go to the bottom of the file.
3. Type `:edit`
4a. Expected behaviour: nothing apparently changes
4b. Actual behaviour: cursor briefly jumps to line 1 then jumps back to bottom of file.

I get this problem on terminal vim ('mvim -v') but not gui MacVim.  I'm running Vim 7.4.258.

Is there a way to prevent the flicker caused by 4b?

Thanks in advance!

Yours,
Andy Stewart

-- 
--

-- 
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 you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

(Continue reading)

shawn wilson | 16 Oct 20:13 2014
Picon

Bug/feature

With vim still running (in tmux/screen/whatever), restart X. The
servername will be lost and the + buffer won't be attached to the X
session anymore. I /think/ I can make a full test for this if y'all
want.

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jun 12 2014 02:41:35)
Included patches: 1-31

IDK if this is a bug or a feature - I wouldn't expect vim to
continuously poll X and do whatever is required to make stuff work,
but I would like a re-init feature that takes vim through startup
without messing with buffers/tabs/etc.

-- 
--

-- 
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 you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Fabien Meghazi | 15 Oct 16:21 2014

vim fugitive: row highlighting

Hi all,

When using vim fugitive's :Gblame, I'd like to have the current line highlighted in both GBlame and file buffer windows. I'm not very confident with vimscript so I don't know if that's possible.

Anyone ?

--

--
--
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 you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe <at> googlegroups.com.
For more options, visit https://groups.google.com/d/optout.