Re: Link to vimweekly.... possible replacement for vimwikia

2014-01-28 Thread lith
 The goal here is very simple, - I will serve as the maintainer of the project 
 and will be responsible for all the edits. The tips on VimWeekly will heavily 
 based on community input, stackoverflow, books and the ultimate vim manual. 

I think it would be a good idea to collect the tips in a way that makes them 
accessible through vim help. There are scripts that convert vimwikia tip pages 
to vim help format. I think your newsletter should provide similar 
functionality -- e.g. by making them also accessible via github in plain text 
format that could later on be converted to vim help files.

I personally think a weekly newsletter is a good format to fight information 
overload and to distribute news/tips to the community.

Regards,
Tom

-- 
-- 
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/groups/opt_out.


Re: Vim Weekly

2014-01-28 Thread Marc Weber
Dear tawheed abdul-raheeem,

I'm not sure whether you've noticed that I proposed a haskell
activities community report [1] like thing for Vim in the past.
Never started it due to lack of time

Now that you use the words replace wikia I'd like to point you to my
effort:
http://vim-wiki.mawercer.de/wiki/index.html

Its a wiki written for this one use case:
  - being easily editable by vim (offline and changes can be pushed by
git)
  - having minimal syntax
  - having unique features (such as feature matrices) which help
writing some content
  - can be edited online without login

I didn't like about wikia:
  - not easily editable/greppable with command line tools
  - ads unless you login

Thus I'd like to invite you to join such effort. if contents gets more
mature (and more people join) I'd like to propose syncing contents to
www.vim.org (because a wiki there would be terrific, too).

The nice thing is that using such a wiki readers could just add comments
or fix small things which might happen.

Tips in this wiki are just simple text files, and this list is generated
form files on disk:
http://vim-wiki.mawercer.de/wiki/tips/

Let me know what you think and whether I may grant you access to the
github repository.

Marc Weber

-- 
-- 
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/groups/opt_out.


Re: how to delete lines containing a pattern and not containing another pattern?

2014-01-28 Thread Arun E
On Friday, January 24, 2014 4:02:05 AM UTC-8, Chan Kim wrote:
 On Thursday, January 23, 2014 11:51:16 PM UTC+9, Chan Kim wrote:
 
   I’m a long-time vi(m) user and I have question.Can I remove lines that 
  contain a pattern but not another pattern?For example, Line 1 : rabbitLine 
  2 : arch sparcLine 3 : arch armLine 4 : tigerI want to remove lines 
  containing arch but not containing sparc.So Here I want to remove only line 
  3 leaving lines 1, 3 and 4 intact. I can remove lines containg ‘arch’ 
  by:g/arch/dI can remove lines not containing ‘sparc’ by:g!/sparc/dHow do I 
  combine those two?I tried:g/arch/!/sparc/d  or :g/arch!sparc/dBut of 
  course it doesn’t work. (with escape before ! also)Is there a way to remove 
  only line 3? I looked it up in the manual but in vain..Thank you!
 
 -
 
 Thank you Tim and Ben (I'll read Ben's post later..)
 
 But I found maybe the nicest one. The following line does it.
 
 :v /sparc/s/.*arch.*\n//
 

Careful with line deleting substitutions when using :g/:v. It will not work 
always:
For eg. with a file like this
--
Line 2 : arch sparc asd
Line 3 : arch arm
Line 4 : arch aaa
---
..the arch aaa will not be deleted.

Tim's  Ben's method would do it.

One more way to do this is:
:g/.*arch\.*\(sparc.*\)\@!$/d

--Arun

-- 
-- 
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/groups/opt_out.


Re: how to delete lines containing a pattern and not containing another pattern?

2014-01-28 Thread Paul

On Tuesday, 28 January, 2014 at 09:17:56 GMT, Arun E wrote:

On Friday, January 24, 2014 4:02:05 AM UTC-8, Chan Kim wrote:

:v /sparc/s/.*arch.*\n//


Careful with line deleting substitutions when using :g/:v. It will not work 
always:
For eg. with a file like this
--
Line 2 : arch sparc asd
Line 3 : arch arm
Line 4 : arch aaa
---
..the arch aaa will not be deleted.


Remove the \n from the command and the last line is removed. However, aren't 
all lines, including the last, unless in binary mode, appended with a newline? 
For example, write a new file such as above, cat it and you'll see a newline at 
the end (the shell prompt is on a new line). 'set list' shows the end of line 
marker ($) (as does 'cat -E'), but not specifically a newline marker. How to 
have vim show newlines with 'set list'? I don't see it in listchars.

--
--
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/groups/opt_out.


RE: Link to vimweekly.... possible replacement for vimwikia

2014-01-28 Thread Konovalov, Vadim
 On Behalf Of tawheed abdul-raheeem
 Sorry for the re-post, yesterday I announced a project that I was working on
 and I forgot to include a link to the page. Probably because I got overly
 excited about the project. Here is a link to the project
 http://www.vimweekly.com/

Very nice :)

-- 
-- 
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/groups/opt_out.


Re: Link to vimweekly.... possible replacement for vimwikia

2014-01-28 Thread Fredrik Andersson
Great project!

Would it be possible to get it as an rss? My mail is cluttered enough as it
is already.


On Tue, Jan 28, 2014 at 12:07 PM, Konovalov, Vadim
vadim.konova...@emc.comwrote:

  On Behalf Of tawheed abdul-raheeem
  Sorry for the re-post, yesterday I announced a project that I was
 working on
  and I forgot to include a link to the page. Probably because I got overly
  excited about the project. Here is a link to the project
  http://www.vimweekly.com/

 Very nice :)

 --
 --
 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/groups/opt_out.


-- 
-- 
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/groups/opt_out.


Re: Vim Weekly

2014-01-28 Thread tawheed abdul-raheeem
On Tuesday, January 28, 2014 4:07:38 AM UTC-5, MarcWeber wrote:
 Dear tawheed abdul-raheeem,
 
 
 
 I'm not sure whether you've noticed that I proposed a haskell
 
 activities community report [1] like thing for Vim in the past.
 
 Never started it due to lack of time
 
 
 
 Now that you use the words replace wikia I'd like to point you to my
 
 effort:
 
 http://vim-wiki.mawercer.de/wiki/index.html
 
 
 
 Its a wiki written for this one use case:
 
   - being easily editable by vim (offline and changes can be pushed by
 
 git)
 
   - having minimal syntax
 
   - having unique features (such as feature matrices) which help
 
 writing some content
 
   - can be edited online without login
 
 
 
 I didn't like about wikia:
 
   - not easily editable/greppable with command line tools
 
   - ads unless you login
 
 
 
 Thus I'd like to invite you to join such effort. if contents gets more
 
 mature (and more people join) I'd like to propose syncing contents to
 
 www.vim.org (because a wiki there would be terrific, too).
 
 
 
 The nice thing is that using such a wiki readers could just add comments
 
 or fix small things which might happen.
 
 
 
 Tips in this wiki are just simple text files, and this list is generated
 
 form files on disk:
 
 http://vim-wiki.mawercer.de/wiki/tips/
 
 
 
 Let me know what you think and whether I may grant you access to the
 
 github repository.
 
 
 
 Marc Weber

Hello Marc,

Thank you very much for giving me heads up on what is out there and potentially 
could be of use. The only problem here is that we seem to have a different take 
on how the project should work.
 
My goal
- We need one person to serve as a door keeper to the project (something like 
the linux kernel project) the main objective here is to fight spam and verify 
that the tip actually works.
- Users should not be allowed to edit the content on the main site, all tips 
would be submitted on github via pull-request or simply editing a file. (Again 
trying to fight spam - I don't think a spammer would want to go through such 
pain)
- To avoid information overload, I propose that tips would be released to the 
public in an increment of 5 tips every week. It is going to take long time but 
we need to start from somewhere.

In the next coming weeks I am hoping to write a command line utility that will 
enable users to submit tips from the CLI, possibly somebody else could create a 
vim plugin to make this available from inside VIM.

Finally, with the amount of feedback and support that I am getting on this 
project I have migrated the project from my personal github account to a github 
organization account.

Let me know what you think - Its an open source project is heavily driven by 
the community.

-- 
-- 
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/groups/opt_out.


Re: Link to vimweekly.... possible replacement for vimwikia

2014-01-28 Thread tawheed abdul-raheeem
On Tuesday, January 28, 2014 7:07:16 AM UTC-5, Fredrik Andersson wrote:
 Great project!
 
 Would it be possible to get it as an rss? My mail is cluttered enough as it 
 is already.
 
 
 
 
 On Tue, Jan 28, 2014 at 12:07 PM, Konovalov, Vadim vadim.k...@emc.com wrote:
 
 
  On Behalf Of tawheed abdul-raheeem
 
 
  Sorry for the re-post, yesterday I announced a project that I was working on
 
  and I forgot to include a link to the page. Probably because I got overly
 
  excited about the project. Here is a link to the project
 
  http://www.vimweekly.com/
 
 
 
 Very nice :)
 
 
 
 
 
 --
 
 --
 
 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+u...@googlegroups.com.
 
 For more options, visit https://groups.google.com/groups/opt_out.

Never really considered support for RSS but with the amount of feedback and 
support I am getting on the project I think I will go ahead and implement it. I 
will keep you posted!

-- 
-- 
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/groups/opt_out.


Re: Link to vimweekly.... possible replacement for vimwikia

2014-01-28 Thread tawheed abdul-raheeem
On Tuesday, January 28, 2014 3:57:36 AM UTC-5, lith wrote:
  The goal here is very simple, - I will serve as the maintainer of the 
  project and will be responsible for all the edits. The tips on VimWeekly 
  will heavily based on community input, stackoverflow, books and the 
  ultimate vim manual. 
 
 I think it would be a good idea to collect the tips in a way that makes them 
 accessible through vim help. There are scripts that convert vimwikia tip 
 pages to vim help format. I think your newsletter should provide similar 
 functionality -- e.g. by making them also accessible via github in plain text 
 format that could later on be converted to vim help files.
 
 I personally think a weekly newsletter is a good format to fight information 
 overload and to distribute news/tips to the community.
 
 Regards,
 Tom

 I think it would be a good idea to collect the tips in a way that makes them 
 accessible through vim help. There are scripts that convert vimwikia tip 
 pages to vim help format. I think your newsletter should provide similar 
 functionality -- e.g. by making them also accessible via github in plain text 
 format that could later on be converted to vim help files.
 

Never thought about that, definitely a great idea and would surely be 
implemented very soon. Stay tuned.

-- 
-- 
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/groups/opt_out.


Re: Vim Weekly

2014-01-28 Thread Marc Weber
 My goal
 - We need one person to serve as a door keeper to the project
 (something like the linux kernel project) the main objective here is
 to fight spam and verify that the tip actually works.
I know - testing tips and judging which to use is most work, correct.

 - Users should not be allowed to edit the content on the main site, all tips 
 would be submitted on github via pull-request or simply editing a file. 
 (Again trying to fight spam
I haven't seen a single spam commit on my wiki yet. And if it happens
git commits are trivially to revert or drop. My idea is to be
uncommon and simple. adding ?vim_edit=1 to a page is very simple - but
no bot will know about it.

 In the next coming weeks I am hoping to write a command line utility
 that will enable users to submit tips from the CLI, possibly somebody
 else could create a vim plugin to make this available from inside VIM.
If you start using my wiki (or wikia) you can start right a way without
writing additional code.

 Finally, with the amount of feedback and support that I am getting on
 this project I have migrated the project from my personal github
 account to a github organization account.
Which organization? I and Zyx (and Shougo) are part of
bitbucket.org/vimcommunity (which also want sto be open to any such
projects). Drop me a line if you want me to add you as admin.

 Let me know what you think - Its an open source project is heavily
 driven by the community.
I think this all should be on the main vim wiki, we should try to
collaborate as much as possible - and I think it should be
usable/greppable on disk.

There are many tips already, people just have to read them.

I'd say: Start spending your time on the tips, then send them to the
mailinglist, do this twice, then think about how to move on depending on
the feedback. You can still write plugins etc.

To get started I'd even say people can put there tips here (I've put
almost everything I find useful on my wiki ..)

If you want to write plugins I'm not going to stop you - just wondering
whether its most important to get started.

Marc Weber

-- 
-- 
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/groups/opt_out.


map with empty yank

2014-01-28 Thread Carlos Pita
Hi all,

I would like to yank the inner contents of ... or (...) expressions in a 
mapping. In normal mode I can try with the two-yank sequence yiyi(. One of the 
yanks will be empty and the other will match the desired contents. The net 
effect is to match the contents no matter they were inside () or . Now if I 
put that in a map it seems to abort when the first yank fails, so it only 
matches the contents for ... expressions (because yi is the first probed 
yank). If I put :normal yiCR:normal yi( instead, the mapping works the same 
than when I manually type it in normal mode. The E flag is not included in my 
cpoptions.

Could someone clarify this behavior, please?

Best regards
--
Carlos

-- 
-- 
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/groups/opt_out.


Re: map with empty yank

2014-01-28 Thread Carlos Pita
PD: I'm assuming ... and (...) expressions are not nested, of course.

On Tuesday, January 28, 2014 4:36:49 PM UTC-3, Carlos Pita wrote:
 Hi all,
 
 I would like to yank the inner contents of ... or (...) expressions in a 
 mapping. In normal mode I can try with the two-yank sequence yiyi(. One of 
 the yanks will be empty and the other will match the desired contents. The 
 net effect is to match the contents no matter they were inside () or . Now 
 if I put that in a map it seems to abort when the first yank fails, so it 
 only matches the contents for ... expressions (because yi is the first 
 probed yank). If I put :normal yiCR:normal yi( instead, the mapping works 
 the same than when I manually type it in normal mode. The E flag is not 
 included in my cpoptions.
 
 Could someone clarify this behavior, please?
 
 Best regards
 --
 Carlos

-- 
-- 
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/groups/opt_out.


Re: map with empty yank

2014-01-28 Thread Christian Brabandt
Hi Carlos!

On Di, 28 Jan 2014, Carlos Pita wrote:

 I would like to yank the inner contents of ... or (...) expressions
 in a mapping. In normal mode I can try with the two-yank sequence
 yiyi(. One of the yanks will be empty and the other will match the
 desired contents. The net effect is to match the contents no matter
 they were inside () or . Now if I put that in a map it seems to
 abort when the first yank fails, so it only matches the contents for
 ... expressions (because yi is the first probed yank). If I put
 :normal yiCR:normal yi( instead, the mapping works the same than
 when I manually type it in normal mode. The E flag is not included in
 my cpoptions.
 
 Could someone clarify this behavior, please?

That is explained (although only briefly) at :h map-error

I am not sure, there is an easy way to achieve what you want. I think, 
something like this could work:

fu! MapAngle()
if searchpairpos('', '', '', 'bn') ==# [0,0]
return i(
else
return i
endif
endfu

omap expr i_ MapAngle()


Best,
Christian
-- 
But Huey, you PROMISED!
Tell 'em I lied.

-- 
-- 
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/groups/opt_out.


Re: map with empty yank

2014-01-28 Thread Carlos Pita
Hi Christian,

thanks for your prompt reply! It's still not clear to me whether
yanking a non-existent text object always raises an error or not.
cpoptions E seems to apply to ymotion but it's not clearly stated
(at least, I can't find that statement) what happens with yobject.

There is an easy workaround that I mentioned before: :norm
yiCR:norm yi(CR. It's somewhat hackish but it's concise. It
should be noticed that :norm yiyi( also fails. This last observation
reinforces the yobject always raises an error for non-matched
objects theory.

Best regards
--
Carlos



On Tue, Jan 28, 2014 at 5:06 PM, Christian Brabandt cbli...@256bit.org wrote:
 Hi Carlos!

 On Di, 28 Jan 2014, Carlos Pita wrote:

 I would like to yank the inner contents of ... or (...) expressions
 in a mapping. In normal mode I can try with the two-yank sequence
 yiyi(. One of the yanks will be empty and the other will match the
 desired contents. The net effect is to match the contents no matter
 they were inside () or . Now if I put that in a map it seems to
 abort when the first yank fails, so it only matches the contents for
 ... expressions (because yi is the first probed yank). If I put
 :normal yiCR:normal yi( instead, the mapping works the same than
 when I manually type it in normal mode. The E flag is not included in
 my cpoptions.

 Could someone clarify this behavior, please?

 That is explained (although only briefly) at :h map-error

 I am not sure, there is an easy way to achieve what you want. I think,
 something like this could work:

 fu! MapAngle()
 if searchpairpos('', '', '', 'bn') ==# [0,0]
 return i(
 else
 return i
 endif
 endfu

 omap expr i_ MapAngle()


 Best,
 Christian
 --
 But Huey, you PROMISED!
 Tell 'em I lied.

 --
 --
 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 a topic in the Google 
 Groups vim_use group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/vim_use/nBBm61o00pI/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 vim_use+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
-- 
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/groups/opt_out.


Re: map with empty yank

2014-01-28 Thread Christian Brabandt

On Di, 28 Jan 2014, Carlos Pita wrote:
 thanks for your prompt reply! It's still not clear to me whether
 yanking a non-existent text object always raises an error or not.
 cpoptions E seems to apply to ymotion but it's not clearly stated
 (at least, I can't find that statement) what happens with yobject.

I think, there is no such thing as an empty text object. If the text 
object isn't valid, Vim raises an error and this also happens in normal 
mode (you can see, by :set visualbell and see how the terminal flashes 
when doing yi and the cursor not being within a  pair.

This errors causes, that your mapping will be aborted.

Best,
Christian
-- 
I disagree with what you say, but will defend to the death your right to
tell such LIES!

-- 
-- 
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/groups/opt_out.


Re: map with empty yank

2014-01-28 Thread Carlos Pita
For future reference, I'm quoting here what a guy in stackoverflow suggested:

Note that the semantics of :normal changes when it is contained in a
try...catch loop, or executed through :silent!: Without it, execution
of the command sequence aborts when an error is encountered; the rest
of the sequence is discarded (like in a macro). With it, all commands
execute, even if an error occurs.

Therefore, you can get the desired behavior with

:silent! normal! yiyi(

Seems a bit cleaner to me than calling :normal twice.

Regards (and thank you again, Christian)
--
Carlos



On Tue, Jan 28, 2014 at 5:41 PM, Christian Brabandt cbli...@256bit.org wrote:

 On Di, 28 Jan 2014, Carlos Pita wrote:
 thanks for your prompt reply! It's still not clear to me whether
 yanking a non-existent text object always raises an error or not.
 cpoptions E seems to apply to ymotion but it's not clearly stated
 (at least, I can't find that statement) what happens with yobject.

 I think, there is no such thing as an empty text object. If the text
 object isn't valid, Vim raises an error and this also happens in normal
 mode (you can see, by :set visualbell and see how the terminal flashes
 when doing yi and the cursor not being within a  pair.

 This errors causes, that your mapping will be aborted.

 Best,
 Christian
 --
 I disagree with what you say, but will defend to the death your right to
 tell such LIES!

 --
 --
 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 a topic in the Google 
 Groups vim_use group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/vim_use/nBBm61o00pI/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 vim_use+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.

-- 
-- 
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/groups/opt_out.


Re: map with empty yank

2014-01-28 Thread ZyX
On Wednesday, January 29, 2014 12:47:01 AM UTC+4, Carlos Pita wrote:
 For future reference, I'm quoting here what a guy in stackoverflow suggested:
 

 Note that the semantics of :normal changes when it is contained in a
 try...catch loop, or executed through :silent!: Without it, execution
 of the command sequence aborts when an error is encountered; the rest
 of the sequence is discarded (like in a macro). With it, all commands
 execute, even if an error occurs.
 
 Therefore, you can get the desired behavior with
 
 :silent! normal! yiyi(
 
 Seems a bit cleaner to me than calling :normal twice.

If this works inside `:try` then it is a bug. Though I am unable to reproduce 
it. `:silent!` variant is documented.

-- 
-- 
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/groups/opt_out.


Re: Vim Weekly

2014-01-28 Thread tawheed abdul-raheeem
On Tuesday, January 28, 2014 1:56:04 PM UTC-5, MarcWeber wrote:
  My goal
 
  - We need one person to serve as a door keeper to the project
 
  (something like the linux kernel project) the main objective here is
 
  to fight spam and verify that the tip actually works.
 
 I know - testing tips and judging which to use is most work, correct.
 
 
 
  - Users should not be allowed to edit the content on the main site, all 
  tips would be submitted on github via pull-request or simply editing a 
  file. (Again trying to fight spam
 
 I haven't seen a single spam commit on my wiki yet. And if it happens
 
 git commits are trivially to revert or drop. My idea is to be
 
 uncommon and simple. adding ?vim_edit=1 to a page is very simple - but
 
 no bot will know about it.
 
 
 
  In the next coming weeks I am hoping to write a command line utility
 
  that will enable users to submit tips from the CLI, possibly somebody
 
  else could create a vim plugin to make this available from inside VIM.
 
 If you start using my wiki (or wikia) you can start right a way without
 
 writing additional code.
 
 
 
  Finally, with the amount of feedback and support that I am getting on
 
  this project I have migrated the project from my personal github
 
  account to a github organization account.
 
 Which organization? I and Zyx (and Shougo) are part of
 
 bitbucket.org/vimcommunity (which also want sto be open to any such
 
 projects). Drop me a line if you want me to add you as admin.
 
 
 
  Let me know what you think - Its an open source project is heavily
 
  driven by the community.
 
 I think this all should be on the main vim wiki, we should try to
 
 collaborate as much as possible - and I think it should be
 
 usable/greppable on disk.
 
 
 
 There are many tips already, people just have to read them.
 
 
 
 I'd say: Start spending your time on the tips, then send them to the
 
 mailinglist, do this twice, then think about how to move on depending on
 
 the feedback. You can still write plugins etc.
 
 
 
 To get started I'd even say people can put there tips here (I've put
 
 almost everything I find useful on my wiki ..)
 
 
 
 If you want to write plugins I'm not going to stop you - just wondering
 
 whether its most important to get started.
 
 
 
 Marc Weber



 I haven't seen a single spam commit on my wiki yet. And if it happens
I dont doubt that but that is probably because it has not yet gained a lot of 
traction from the community and also web bots. I was not there when vim-wikia 
started but I am pretty sure that they made such assumptions.


 If you start using my wiki (or wikia) you can start right a way without
 
 writing additional code.
There is not a lot of code left to write, we (meaning us the 
community/maintainers) have over 100+ subscribers who have given us their 
emails and expect 5 vim tips in their mailbox on monday. I could certainly port 
some of your code to what I already have.


 Which organization? I and Zyx (and Shougo) are part of
 
 bitbucket.org/vimcommunity (which also want sto be open to any such
 
 projects). Drop me a line if you want me to add you as admin.
The new organization created to host all the code is 
https://github.com/vimweekly - I agree that we need to have a centralized 
location for all vim related projects, there is no point in having multiple 
accounts trying to do the same thing. By the way Marc, I noticed that you have 
a github account and wondering why you guys chose bitbucket since the majority 
of devs use github. The only thing that I can think of is because is free but 
wait all the code we write is meant to be public and free for all.



 I think this all should be on the main vim wiki, we should try to
 
 collaborate as much as possible - and I think it should be
 
 usable/greppable on disk.
Yeah we can certainly have a conference call with the other maintainers of 
vimcommunity to lay out potential plans for the project. Yes it is definitely 
going to be be greppable. Since other subscribers are already asking about rss 
feeds and all the other good stuffs I have decided to write an API that would 
return either a JSON or XML feed (has not yet been implemented but should be 
done by this weekend)

 I'd say: Start spending your time on the tips, then send them to the
 
 mailinglist, do this twice, then think about how to move on depending on
 
 the feedback.
This might not be possible as we already people waiting for their 5 tips.
Remember that is about creating an entirely new vim experience in the 
community. It might take a really long time before we get there but a first 
step must be taken.


Tawheed

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

Re: Vim Weekly

2014-01-28 Thread Ben Fritz
On Tuesday, January 28, 2014 7:23:50 PM UTC-6, tawheed abdul-raheeem wrote:
 On Tuesday, January 28, 2014 1:56:04 PM UTC-5, MarcWeber wrote:
  I haven't seen a single spam commit on my wiki yet. And if it happens
 
 I dont doubt that but that is probably because it has not yet gained a
 lot of traction from the community and also web bots. I was not there
 when vim-wikia started but I am pretty sure that they made such
 assumptions.
 

On the contrary. vim-wikia was started specifically BECAUSE the original
vim tips, hosted on vim.org, were seeing excessive amounts of spam, and
it was too hard to deal with the spam. Wikia provides staff to help
fight spam, filters, revert tools, page protection (temporary), etc.

One of the biggest goals of the vim tips, is to allow ANYBODY to add or
comment on them (or edit them, in the wiki anyway). Requiring a github
or other account to edit will turn too many people away. Requiring all
submissions to go through a single person will also discourage
participation.

Look, it's cool that you want to share your Vim knowledge with the
community with a weekly tweet or something. But it's not going to
replace the tips in the current form.

-- 
-- 
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/groups/opt_out.


Re: Vim Weekly

2014-01-28 Thread tawheed abdul-raheeem
On Tuesday, January 28, 2014 11:04:35 PM UTC-5, Ben Fritz wrote:
 On Tuesday, January 28, 2014 7:23:50 PM UTC-6, tawheed abdul-raheeem wrote:
  On Tuesday, January 28, 2014 1:56:04 PM UTC-5, MarcWeber wrote:
   I haven't seen a single spam commit on my wiki yet. And if it happens
  
  I dont doubt that but that is probably because it has not yet gained a
  lot of traction from the community and also web bots. I was not there
  when vim-wikia started but I am pretty sure that they made such
  assumptions.
  
 
 On the contrary. vim-wikia was started specifically BECAUSE the original
 vim tips, hosted on vim.org, were seeing excessive amounts of spam, and
 it was too hard to deal with the spam. Wikia provides staff to help
 fight spam, filters, revert tools, page protection (temporary), etc.
 
 One of the biggest goals of the vim tips, is to allow ANYBODY to add or
 comment on them (or edit them, in the wiki anyway). Requiring a github
 or other account to edit will turn too many people away. Requiring all
 submissions to go through a single person will also discourage
 participation.
 
 Look, it's cool that you want to share your Vim knowledge with the
 community with a weekly tweet or something. But it's not going to
 replace the tips in the current form.

Its definitely a start, lets see how far it goes and its potential.

-- 
-- 
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/groups/opt_out.


Re: Avoid switching files with ctrl-o

2014-01-28 Thread Paul
On Monday, January 27, 2014 10:56:44 AM UTC-5, Paul wrote:
On Sunday, January 26, 2014 8:16:56 AM UTC-5, Christian Brabandt wrote:
On Fr, 24 Jan 2014, Paul wrote:
 What should the file name be?
 
 Whatever you like, though I would suggest a useful name, e.g. 
 filejump.vim
 
 Thanks, Christian.

I think I'm missing something.  I have it stored as 
c:/Users/USERNAME/Documents/vimfiles/plugin/filejump.vim, and I've since 
restarted gvim.  It's still switching files sometimes.  I need to read more 
about plugins to confirm that it is being picked up, but I'm in a bit of a 
marathon of back-to-back 15 hour days right now due to a deadline.  I'll follow 
up and post more investigation at next opportunity.

Thanks anyway.

-- 
-- 
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/groups/opt_out.


Re: Vim Weekly

2014-01-28 Thread Benjamin Klein
On Jan 28, 2014, at 10:11 PM, tawheed abdul-raheeem tawra...@gmail.com wrote:

 On Tuesday, January 28, 2014 11:04:35 PM UTC-5, Ben Fritz wrote:.
 
 Look, it's cool that you want to share your Vim knowledge with the
 community with a weekly tweet or something. But it's not going to
 replace the tips in the current form.
 
 Its definitely a start, lets see how far it goes and its potential.

From what I can tell there is a lot of good stuff on the Wikia site. I just 
really wish that it didn't have to be so tightly tied to the specific hosting 
site that it's on.

And I should mention participation-wise: I would *like* to contribute to 
something on GitHub. These days it's becoming increasingly uncommon, in my 
experience, to find a programmer type who does stuff and does not have a GitHub 
account. Quite to the contrary, I do not have any account on Wikia. I first 
*heard* of Wikia when I started coming across some of the tips on the Vim wiki 
there. I do not voluntarily spend time on that particular hosting site and I do 
not want to set up yet another account on yet another site when the proportion 
of use would be so much in favor of something like GitHub, which I use 
basically every day for all kinds of projects and where it is by the site's 
very nature easy for me to make or suggest improvements.

While we are on Wikia etc.: Thanks to Ben Fritz, John Beckett, and all the 
others who help or have helped to maintain or edit or contribute to or set up 
the Vim wiki there. :)

--
b

Sent from my iPhone

-- 
-- 
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/groups/opt_out.