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.
Josef Fortier | 14 Oct 22:35 2014
Picon

errorformat for unified diff?

I've put together a more or less working unified diff errorformat compiler plugin for git diff. It's not
quite right, as I don't see a way to get the errorformat string to honor the hunk sizes, but it works well
enough to be useful.

For context, my goal is to provide populate a quickfix list with all the git changes in a project for review.

It seems like unified diff parsing is potentially a more generally useful thing. Is there a better
approach? Or a better approach to errorformat parsing? As I understand it grep works with the same backend.

FWIW here's the more or less working format. I'm sure it could (should) be cleaner (I'm sure I'm matching too
much for instance)

CompilerSet errorformat=                                                                                              
              \%-G+,                                                                                                    
              \%-P---\ a/%f,                                                                                            
              \%-Gdiff%.%#,                                                                                             
              \%-Gindex%.%#,                                                                                            
              \%-G+++%.%#,                                                                                              
'             \%A <at>  <at> \ %.%#\ +%l%.%#\ %m,                                                                                 
              \%C\ ,                                                                                                    
              \%C\-%m,                                                                                                  
              \%Z+%.%#,                                                                                                 
              \%-G\ ,                                                                                                   
              \%-G%.%# 

-- 
--

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

keith.briggs | 14 Oct 16:40 2014

filetypes in edit menu

If I'm editing foo.cc, it is correctly syntax-highlit as a C++ file.   However, if I then want to edit another
C++ file, the only options on the "Edit File" dialog is "All files" or "C++ source (*.cpp, *.hpp)".   This is
inconsistent; how do I get "*.cc" added to this "C++ source" list?

Thanks,
Keith

-- 
--

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

ping | 13 Oct 23:37 2014
Picon

vim netrw: ***warning*** this version of netrw needs vim 7.3.465 or later

I got this message when I copy my .vim into a server running old vim:
***warning*** this version of netrw needs vim 7.3.465 or later

server vim:
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jan 31 2011 23:23:08)

this is fine. I thought just new feature won't work, but the fact it 
looks like the whole netrw doesn't work at all - I can't open(:edit .) a 
folder now.

should this behavior of new netrw changed to be more "backward-compatible"?

-- 
--

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