Sorry to use the `e' word but does vim have similar to cperl

2017-08-25 Thread Harry Putnam
Any one here familiar with emacs cperl mode, that can tell me how to
get something similar when using vim?

If not familiar, `cperl-mode' trys to offer a host of short cuts that insert
quite a bit of standard code for you... a simple example is; if you
type `if' `cperl-mode' inserts:

  if (_) {
  }

With the underscore indicating where the cursor is left.

I vaguely remember using something with vim, years ago, that did
something similar, but no longer remember how to load that sort of
thing.

With my current vim setup (just the basic install on debian using
`aptitude install vim'), plus a .vimrc carted around from OS to OS for
years. 

If opening a perl script, I get syntax highlighting but when coding I
get no help... no tricky inserts or the like. 

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: "sudo vim example" and "vim example"

2017-08-25 Thread Grant Taylor
On 08/25/2017 09:00 AM, Tobias Klausmann wrote:
> Well, if vim is run with sudo, it runs as root and uses root's 
> settings (vimrc etc). What you probably want is sudoedit. It 
> copies the file you want to edit and launches the default editor 
> on it. Once you quit, it copies the file back with propepr 
> permissions etc.

Further, sudoedit (which uses your $EDITOR) is safer than running vim under 
sudo.

At least from a security perspective, sudoedit is safer as many editors, vim 
include, provide a way to escape the editor and launch a shell.

"sudo vim /path/to/file" followed by ":shell" gives you root shell.

"sudoedit /path/to/file" followed by ":shell" gives you a shell as your normal 
user.



-- 
Grant. . . .
unix || die

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How to use stop directory in up/down search

2017-08-25 Thread Ben Fritz
I'm struggling to understand how to use "stop directories" in a combined 
upward/downward search.

I have the following directory layout:

/home/user/test/
| nosearch/
| | file.txt
| stopdir/
| | somedir/


I expect these commands in Vim to NOT find the file "file.txt", because the 
search should stop at "stopdir" and avoid searching the "nosearch" directory:

:cd /home/user/test/stopdir/somedir
:echo findfile('file.txt', '**;/home/user/test/stopdir')
 
However, instead I get the output:

/home/user/test/nosearch/file.txt

Likewise, if I do the following:

:set path=**;/home/user/test/stopdir
:find file.txt

Then file.txt is edited.

What am I doing wrong? I thought I'm doing just about exactly what's documented 
in the help under :help starstar, item 3) "Combined up/downward search".

Tested in a "HUGE" 8.0.987 build on both Windows 10 and an Xubuntu VM.

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: "sudo vim example" and "vim example"

2017-08-25 Thread Tobias Klausmann
Hi! 

On Fri, 25 Aug 2017, Maksim Yugai wrote:
> Can someone help me? I saved vim config file into ~/.vim/vimrc.
> And when I use "vim example" all settings are working, but when
> I use "sudo vim example" - it doesn't work! Looks like problem
> with privileges. =) 
> 
> Use Debian Stretch. 

Well, if vim is run with sudo, it runs as root and uses root's
settings (vimrc etc). What you probably want is sudoedit. It
copies the file you want to edit and launches the default editor
on it. Once you quit, it copies the file back with propepr
permissions etc.

HTH,
Tobias

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to compile and install gVim with Lua support?

2017-08-25 Thread Phil Dobbin
On 25/08/17 15:26, DwigtArmyOfChampions wrote:

> Aren't those all Linux commands? I'm using Windows 10.

It helps if you tell people what OS you're using in the first place.

Cheers,

  Phil.

-- 
The sun shone, having no alternative, on the nothing new
   Murphy by Samuel Beckett

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Re: how to compile and install gVim with Lua support?

2017-08-25 Thread Christian Brabandt

On Fr, 25 Aug 2017, DwigtArmyOfChampions wrote:

> Aren't those all Linux commands? I'm using Windows 10.

you can check, what we do in the nightly windows builds:
https://github.com/vim/vim-win32-installer/blob/master/appveyor.bat


Best,
Christian
-- 
Mit den Frauen ist das wie mit den Hemden, erst wenn man sie am Hals hat,
weiß man, ob sie passen...

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


"sudo vim example" and "vim example"

2017-08-25 Thread Maksim Yugai
Hi, everyone.

Can someone help me? I saved vim config file into ~/.vim/vimrc. And when I use 
"vim example" all settings are working, but when I use "sudo vim example" - it 
doesn't work! Looks like problem with privileges. =) 

Use Debian Stretch. 

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

--- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to compile and install gVim with Lua support?

2017-08-25 Thread DwigtArmyOfChampions
Aren't those all Linux commands? I'm using Windows 10.

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: how to compile and install gVim with Lua support?

2017-08-25 Thread Mauro Locatelli
Hi,
I usually use this gist
 for vim
installation with ruby, lua and python.
I hope you can find it useful

Cheers
Mauro

2017-08-25 15:03 GMT+02:00 DwigtArmyOfChampions <
dwightarmyofchampi...@hotmail.com>:

> Where can I find detailed instructions on how to compile gVim with Lua
> support?
>
> --
> --
> 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+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


how to compile and install gVim with Lua support?

2017-08-25 Thread DwigtArmyOfChampions
Where can I find detailed instructions on how to compile gVim with Lua support?

-- 
-- 
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+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.