Why does this mapping move my cursor?

2018-10-10 Thread Chris Lott
I have a mapping in my .vimrc :

nnoremap md :write:silent !open -a 'Marked.app' '%:p'

When I invoke the map, my cursor in Vim moves to the beginning of the line. 
This doesn't happen if I run the commands manually. Why does the cursor move 
and how can I stop it from doing so?

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.


wrapping a series of comma separated words

2017-08-10 Thread Chris Lott
I'm constantly needing to wrap a series of comma separated titles with html  
tags, so this:

John has published work in foo, fubar, boo review, and many more.

Becomes this

John has published work in foo, fubar, boo review, and 
many more.
 
Right now I'm visually highlighting each title and using emmet to wrap with the 
tags, but it seems like there must be a shorter way!

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


"Exploding" a paragraph into individual lines

2016-01-27 Thread Chris Lott
I'd like to take a paragraph like the following:

This is a paragraph. Wow! What do I do now? 

And break it into individual lines, ala:

This is a paragraph.
Wow!
What do I do now?

StackExchange revealed this regex that seems to work well matching the proper 
lines:
[.!?][])"']*\($\|[ ]\)

So I can do this:
:%s/[.!?][])"']*\($\|[ ]\)/XXX\r\r/g

But obviously need something where XXX is!

c

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


sorting lines by term inside a tag

2015-06-16 Thread Chris Lott
I need to sort lines like this:

lia href=http://foo.com/;Lisa/li
lia href=http://ymmv.com/;Bart/li
lia href=http://donuts.com/;Homer/li

by the name inside the a tag, thus:

lia href=http://ymmv.com/;Bart/li
lia href=http://donuts.com/;Homer/li
lia href=http://foo.com/;Lisa/li

Can I do this within Vim?

c
--
Chris Lott ch...@chrislott.org

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


Moving to next tag in HTML

2015-06-10 Thread Chris Lott
Let's say I'm editing text, I'm in insert mode, and my cursor is at
the position marked by the | character:

pstrongQuestion 2|/strong/p

And I want to move the cursor after the closing tag (or before the next tag):

pstrongQuestion 2/strong|/p

Is there a simpler way to do this than either: ESCwwwa or ESCffa

?

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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: macvim for Yosemite?

2015-05-23 Thread Chris Lott
On Sat, May 23, 2015 at 3:15 PM, Eric Christopherson
echristopher...@gmail.com wrote:
 redirects to
 https://github.com/macvim-dev/macvim . (I'm unsure of how canonical it
 is, though, since it's a fork of b4winckler's MacVim.)

That's the right one. If I recall correctly, Bjorn stepped down and
this is the official MacVim site now.

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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: quickly viewing a directory of files

2015-04-05 Thread Chris Lott
On Sat, Apr 4, 2015 at 10:47 PM, Paul Isambert zappathus...@free.fr wrote:
 What about simply passing the filenames as arguments to Vim, something
 like “vim clips-*” (assuming you’re on *nix), then use “n” to repeat
 the search (after you’ve defined it once) and jump where you want,
 yank your text, then “:next” to the next file?

Great, thanks! Simple is sometimes best...

c
--
Chris Lott ch...@chrislott.org

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


quickly viewing a directory of files

2015-04-04 Thread Chris Lott
I have a directory of files with names like 'clips-20150101'
'clips-20150102' etc. I need to open a file, jump to a particular string,
optionally yank some arbitrary text, and repeat for every file in the
directory. What's the quickest way to do this in Vim?

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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: Looking for a simple LispIDE

2015-03-24 Thread Chris Lott
On Tue, Mar 24, 2015 at 7:46 PM,  meino.cra...@gmx.de wrote:
 Is there any other source for this?

Google says, maybe: http://www.drchip.org/astronaut/vim/#RUNVIEW would work?

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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: Any poets here?

2015-02-03 Thread Chris Lott
On Fri, Jan 30, 2015 at 10:57 AM, Eric Weir eew...@bellsouth.net wrote:

 Wondering if there are any poets here who use vim in writing poetry,
 either in the messy creative phase or the later refining, polishing, and
 editing phase. If so, I’d be interested in knowing how you use vim, how you
 find vim helpful, and whether there are any plugins that you have found
 especially helpful.


While I tinker with Vim, my primary uses are for literary/creative work:
poems, essays, a newsletter, etc. I've often thought that someone should
write a guide for the non-programming audience. It won't be me...I have
neither the time nor the expertise and, more importantly, realized that
really I'd end up writing a guide for using Markdown/MultiMarkdown/Pandoc
and associated tools and plugins since, for the most part, the
customizations to Vim for composing text in general make up a pretty small
set.

Still, it would be a cool thing for someone to write!

c
--
Chris Lott ch...@chrislott.org

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


relative marks?

2014-05-07 Thread Chris Lott
Is there a way to set a mark (or similar) that is relative to a word?
For instance, given the following text:

Foo bar. Baz.
And more stuff.

I'd like to be able to quickly jump to the space after bar. even if
the text has been changed to something like:

Additional text. Foo bar. Baz.
And more stuff.

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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: Poll: What's good about plugin managers?

2014-03-23 Thread Chris Lott
On Sun, Mar 23, 2014 at 8:47 AM, ed jones spong...@gmail.com wrote:
 I see no reason to continue Pathogen, it too depends on git


How so?

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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: Progressive highlight while typing - incsearch

2014-03-03 Thread Chris Lott
On Mon, Mar 3, 2014 at 6:37 AM, Albatossable alex.da...@gmail.com wrote:
 is it possible to highlight all occurences found during incremental search 
 _WHILE STILL TYPING_?


Something along these lines might help:
http://vim.wikia.com/wiki/VimTip572

c
--
Chris Lott ch...@chrislott.org

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


filetypes and global variables

2014-02-28 Thread Chris Lott
I'm using the Vim Airline plugin which has a nice facility for
displaying whether a file has mixed indents and/or trailing spaces
based on setting a variable:

let g:airline#extensions#whitespace#checks = [ 'indent', 'trailing' ]

However, I'd like to set that to only show mixed indenting problems
when editing Markdown files (that have the extension .md).

How can I configure this in my .vimrc so that it accommodates this...
I often have markdown and, say, Python files open at the same time (in
the latter I want both options, of course)...

c
--
Chris Lott ch...@chrislott.org

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


sorting/randomizing text blocks separated by empty lines

2014-01-24 Thread Chris Lott
Given a document with text blocks separated by empty lines:

```
foo
chunk one

bar
chunk two

baz
chunk three
```

I need to both (for different purposes) 1) sort the blocks by their
first lines and then 2) randomize the blocks by their first line.

How might one (I) do this?

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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: Yank current word into a register e.g. register +

2014-01-23 Thread Chris Lott
On Thu, Jan 23, 2014 at 7:20 AM, A. S. Budden abud...@gmail.com wrote:
 +yaw or +yiw depending on how much you want to grab


What's the shortest/quickest way to grab the current word without
changing the cursor position?

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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: Simplified logo concept

2013-11-07 Thread Chris Lott
On Wed, Nov 6, 2013 at 7:35 PM, Justin M. Keyes justi...@gmail.com wrote:

 I am really glad that Vim's icon is getting some interest and
 attention.



I am too, and I like the proposed redesign. However,
conversation/debate/arguments/insults seem pointless if there isn't some
end to it. I assume Bram makes the final call? Does he care? Could this be
setup with a time for proposals and a vote? Arguing icon aesthetics on the
list could be fun (for some; not so much for others) but it's just going to
become another reference point when the next cycle rolls around if there's
not some kind of process, no?

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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: Error browsing epub (zip) files (cdpath)

2013-11-04 Thread Chris Lott
On Mon, Nov 4, 2013 at 6:07 AM, Charles E Campbell 
drc...@campbellfamily.biz wrote:

 And then I tried using the autocmd you gave above in my .vimrc file on an
 epub file that had plenty of spaces in it:

   $HOME/Calibre Library/John Schember/Calibre Quick Start Guide
 (1)/Calibre Quick Start Guide - John Schember.epub

 It opened the file properly and gave a me a listing.  I then selected one
 of the xhtml files therein; it too, opened without a problem.  So, I am
 unable to duplicate your issue.

 I did these things using a Scientific Linux 6.3 o/s and zip.vim v27.  If
 your zip.vim isn't v27, you may get a copy from my website:
 http://www.drchip.org/astronaut/vim/index.html#ZIP .



Thanks, upgrading from v26 to v27 took care of the issue. To be clearer,
with v26 the listing and file opening worked, the latter just threw an
error that didn't seem to have any actual operational effect.

c
--
Chris Lott ch...@chrislott.org

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


Error browsing epub (zip) files (cdpath)

2013-11-03 Thread Chris Lott
I have the following in my .vimrc for exploring .epub files:

au BufReadCmd   *.epub  call zip#Browse(expand(amatch))

It works, but when I open any of the files in the zip archive, I get the
following error:

Error detected while processing BufEnter Auto commands for *:
E344: Can't find directory
zipfile:/Users/chris/Dropbox/ebooks/calibre-library/Aesop/Aesop's Fables
(688) in cdpath
E472: Command failed

Though the file does open. Is this related to the spaces in the filename,
perhaps?

c
--
Chris Lott ch...@chrislott.org

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


jump to true beginning of line

2013-11-02 Thread Chris Lott
When editing code that is indented can I jump to the true beginning of a
specific line (say line 10) in one shot? I know 10gg and :10 but both of
those take me to the first non-whitespace character of the line rather than
the 0th character.

I suspect this is a stupid question, but Googling and help are not helping!

c
--
Chris Lott ch...@chrislott.org

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


inserting filenames

2013-10-31 Thread Chris Lott
I have a directory of files named such:

amalek-pages_01-Blot.png
amalek-pages_02-New.png
amalek-pages_03-Adipose.png
...

I need to create a series of HTML sections like such:

section
img width=550 height=650
src=pages/amalek-pages_01-Blot.png alt=Blot
/section
section
img width=550 height=650
src=pages/amalek-pages_02-New.png alt=Blot
/section
section
img width=550 height=650
src=pages/amalek-pages_03-Adipose.png alt=Blot
/section
...

Tab completion on filenames helps, but with 55 images I have to
navigate through the list further and further for each section...and I
don't see a good way to jump directly to a particular entry in the
completion list (if I could, problem solved: I could just start the
completion and type 15 or 16 etc).

Where do I start automating something like this with Vim?

c
--
Chris Lott ch...@chrislott.org

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


yanking non-contiguous lines?

2013-10-07 Thread Chris Lott
Assuming Vim without plugins like YankRing or the like, what is the
fastest way to copy non-contiguous lines to another place in the
document, such as a document:

AAA
BBB
CCC
DDD

That I want to become

   AAA
   BBB
   CCC
   DDD

   AAA
   CCC
   DDD

Thanks!

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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: ESC key stopped working -- any alternate for menuless vim to get to normal mode?

2013-10-07 Thread Chris Lott
On Mon, Oct 7, 2013 at 8:06 PM, Nikolay Pavlov zyx@gmail.com wrote:
 Note: on the keyboard where I have neither Control nor Escape (Motorola
 Droid 4 hardware keyboard) I mapped jj to ESC.


I found mapping jk (or maybe kj now that I think about it) to ESC
works very well under the fingers.

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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: Delete lines matching expression?

2013-09-10 Thread Chris Lott
 For example, replace all lines containing test to nottest:
 :%s/test/nottest/c
  Instead, is there some way to delete all lines containing test, with
 confirmation?

Not sure about the confirmation step. This kind of things works for
the deleting of lines matching a pattern test:

:%g/test/d

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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: ANN: YankRing 17.0

2013-08-30 Thread Chris Lott
On Thu, Aug 29, 2013 at 6:33 PM, Francis Ngoh yfn...@gmail.com wrote:
 Im away from my computer but I found a workaround ... ie dont use numbered
 registers for the macro.


Maybe I'm missing something, but I don't see how this solves the
problem. dt isn't using a numbered register, it's deleting to the
character 

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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: ANN: YankRing 17.0

2013-08-30 Thread Chris Lott
On Fri, Aug 30, 2013 at 11:50 AM, Nikolay Pavlov zyx@gmail.com wrote:
 Numbered registers are populated from deletes unless another register was
 specified. The help states though that one-line deletes should not affect
 numbered registers (with some exceptions, but t is not the one).


That seems irrelevant to the case I am having a problem with:

| this is a line with a quote

Where | is the cursor

dt triggers the problem. I don't see how the register matters. From the help:


t{char}Till before [count]'th occurrence of {char} to the
right.  The cursor is placed on the character left of
{char} |inclusive|.
{char} can be entered like with the |f| command.

I'm not a vim expert.

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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: yank / delete / paste without output

2013-07-18 Thread Chris Lott
On Thu, Jul 18, 2013 at 11:22 AM, Benji Fisher be...@fisherfam.org wrote:
 P.S. Is there a way to configure Gmail's web interface to make
 bottom-posting more convenient?


Higlight what you want to quote before pressing Reply  (or 'R').

c
--
Chris Lott ch...@chrislott.org

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




find and replace with sequential numbers

2013-07-12 Thread Chris Lott
I have a document with the following kind of text:

## 3. foo

various text here

## 1. foo

more text here

What I would like to do is search for all the headers (## X. etc) and
replace them with the proper sequential numbering. How do I approach
this?

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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: append to non-blank lines in a selection

2013-06-21 Thread Chris Lott
On Fri, Jun 21, 2013 at 6:55 AM, Ben Fritz fritzophre...@gmail.com wrote:
 Since you don't like regex (although you're right, you should learn)

It's not that I don't like regex, it's that I've found them hard to
learn. Suggestions on good sites/books/etc to learn them would be much
appreciated.

c
--
Chris Lott ch...@chrislott.org

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




append to non-blank lines in a selection

2013-06-20 Thread Chris Lott
Given a text:

line1 has stuff
so does line 2

line 4 has more stuff
and line 5
and so on

I would like to select the text block and append a word to each
non-blank line. I can use a block selection and `A` to add to all
selected lines, but not sure how to only apply to lines that have
text.

PS I'm guessing I need to learn regular expressions, which confound me
to no end. Any pointers to good places to learn regex would be great!

c
--
Chris Lott ch...@chrislott.org

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




multiple substitutions of individual characters

2013-06-20 Thread Chris Lott
I have a mapping in my .vimrc to replace smart typographic
characters with their plain text counterparts:

map ,fq 
:%s/“//eenter:%s/”//eenter:%s/‘/'/eenter:%s/’/'/eenter:%s/–/--/eenter:%s/—/---/eenter:%s/…/.../eenter

It strikes me that this is probably not the best way to go about
this...I was thinking it would be cleaner to somehow use an array of
characters and replacements (or something similar)?

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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: Which snapshot for Mountain Lion?

2013-06-17 Thread Chris Lott
On Sun, Jun 16, 2013 at 3:11 AM, Eric Weir eew...@bellsouth.net wrote:
 Just bought a MacBook Air, graduating me from Snow Leopard to Mountain Lion.
 Text on this page http://code.google.com/p/macvim/ says there is no stable
 build for Mountain Lion, but there is for Snow Leopard. Will the SL snapshot
 run under ML? Is it recommended instead of the ML snapshot?


 Posted this to vim_mac yesterday and haven't gotten a response yet. Anyone
 here have advice about this?

I'm running 7.3.754 using Brew on ML and it is rock solid. Snapshot
66, which is also 7.3.754 was also perfect.

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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 fix h1 id strings?

2013-06-05 Thread Chris Lott
On Tue, Jun 4, 2013 at 1:11 PM, Steve Litt sl...@troubleshooters.com wrote:
 Zencoding is to snipMate as Vim is to Notepad. Zencoding looks to me to
 be much faster and more adaptable once you learn it, but it has a huge
 learning curve.

I was under the impression that you couldn't add your own snippets
to Zencoding. Is that not true?

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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 fix h1 id strings?

2013-06-04 Thread Chris Lott
On Mon, Jun 3, 2013 at 1:07 PM, Steve Litt sl...@troubleshooters.com wrote:
 I just won't let any two h?
 texts be the same, and actually, why would that happen in normal
 authoring?

Really? Happens to me all the time:

h1Monkey
h2 Habitat
h2 Dances

h1Pig
h2Habitat
h2Dances

Headers outline a structure that can nest...hacking the headers is a
hack, but it grows to be an ugly one.

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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: Relative line numbering and current line

2013-06-02 Thread Chris Lott
On Sun, Jun 2, 2013 at 2:43 PM, tooth pik toothp...@gmail.com wrote:

Ben Fritz wrote:
 I think all it takes is a help note. In :help 'number' replace the bit about 
 resetting 'relativenumber' with something like:

  If 'relativenumber' is also set, puts the line number only on the line 
 with the cursor

 And at :help 'relativenumber' replace the bit about resetting 'number' with 
 something like:

  If 'number' is also set, the line with the cursor contains the line 
 number, otherwise zero.

 +1 Ben!  I didn't understand this approach til I saw this email!  I
 like it too.

I echo this sentiment: I really wasn't understanding the issue at all
until this message. But now I not only understand, but it seems like a
preferable setup to me.

c
--
Chris Lott ch...@chrislott.org

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




Why use relative line numbers?

2013-05-29 Thread Chris Lott
The discussion about relative line numbers raises the question (for
me): why use relative line numbers at all?

The main reason I keep reading is that instead of having to calculate
how many lines one wants to move and then use, say, 5j to move there
(or pressing j five times, yuck), one can immediately see that the
desired line is 5 lines away.

But if I am on line 7 and see something on another line, I can just
use 12gg or 12G to get there. And if I have relative numbering on, it
messes with specifying ranges (as far as I can tell). Does relative
numbering offer other efficiencies?

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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: head blank selected

2013-05-02 Thread Chris Lott
On Wed, May 1, 2013 at 6:17 PM, shada laf...@gmail.com wrote:
 1.Move the cursor to the end of the line
 2.Press shift + Home

 head blank selected, i don't want select head blank, how should i do?

If I understand correctly, you have spaces at the beginning of the
line but want to select only to the first non-space character?

You could use v^ to select rather than the shift+home. Or look at one
of the smart home scripts to change the behavior:
http://vim.wikia.com/wiki/Smart_home

Does that help?

c
--
Chris Lott ch...@chrislott.org

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

2013-03-21 Thread Chris Lott
On Thu, Mar 21, 2013 at 8:09 AM, Marc Weber marco-owe...@gmx.de wrote:
 Use github.com/MarcWeber/vim-adddon-commenting which always prefers
 those # // like line prefix comments and you're done.

Typo in link, should be: https://github.com/MarcWeber/vim-addon-commenting

Nice plugin.

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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: ios vim and plugins

2013-02-19 Thread Chris Lott
On Tue, Feb 19, 2013 at 4:33 AM, Eric Weir eew...@bellsouth.net wrote:

 I have no problem getting into insert mode using the virtual keyboard.

Nor do I. But it's too slow. Or I should say: I'm too slow on it. I
type between 90-100 wpm on my external keyboard.


 I am sticking with the virtual keyboard.

My keyboard folds up as part of a folio that also holds paper. Most
people have no idea there's an iPad and keyboard until I fold it out,
so it's no burden. It's just frustrating that Vim iOS seems to have
stopped because I have to think this would be an easy fix (after all,
I have no problems with any other editing apps and I have used a LOT
of them).

An extra row of virtual keys, as some editors provide, would be
useful, but just a kludge for those of us who prefer a keyboard we can
type significantly faster on.

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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: ios vim and plugins

2013-02-19 Thread Chris Lott
On Tue, Feb 19, 2013 at 5:44 AM, David Sanson dsan...@gmail.com wrote:
  There is still development going on at the  project's github page.

Sort of. But this particular issue has been reported for nearly a year
with no response of any kind. It's not a total loss, though, because
even when I could make the keyboard work it was so laggy that I didn't
see the point in it!

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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: ios vim and plugins

2013-02-19 Thread Chris Lott
On Tue, Feb 19, 2013 at 7:48 AM, Eric Weir eew...@bellsouth.net wrote:


 I gather typing fast is important to programmers, at least to some. As a 
 writer, typing fast is not important. The critical thing is how fast is my 
 thinking. If I'm writing something that requires thought, if writing is 
 thinking, the thinking is often slower than the typing. At least for me. 
 Actually, being forced to type slow can improve the thinking.


You have me wrong there. I am a writer, not a programmer. I use Vim
almost exclusively for prose and poetry. For the former, a cursor that
lags significantly behind my typing is frustrating because I type as
close to the speed of my thoughts as I can. It's very rare that I find
myself typing something in which my thought moves slower than my
ability to type.

*My* process involves handwriting for the slow writing.

My point is this: the bluetooth keyboard works EVERYWHERE except with
Vim. There's no good reason for that and no good reason it hasn't been
examined at all nearly a year after multiple reports. This isn't some
obscure accessory! But as long as it is *that* laggy, I won't find it
useful.

c
--
Chris Lott ch...@chrislott.org

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




PRIVATE [was Re: ios vim and plugins]

2013-02-19 Thread Chris Lott
On Tue, Feb 19, 2013 at 10:45 AM, Eric Weir eew...@bellsouth.net wrote:

 And on speed of thought vs.speed of typing, there are lots of
 pauses in my writing. Often I am figuring it out word  by word.
 (Or, as Anne Lamott would have it, Bird by Bird.)

Mine too...unless I'm doing work (technical, memos, reports, etc)
writing. Otherwise the composition stage is itself laggy in a
different way!

I really wanted to note: _Bird by Bird_ is a favorite of mine...

It's nice to see other writers using Vim.

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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: mapping a substitute for the Esc key?

2013-02-19 Thread Chris Lott
On Tue, Feb 19, 2013 at 9:04 AM, Steve Litt sl...@troubleshooters.com wrote:
 I'm actually thinking of using jf. The jk sequence seems a little
 slow/tiring because I have to reposition the hand in a weird way.

Most who type in classical position have jk under their index and
middle finger, making it easy to rapidly type the two. kj would be the
most natural for me, but it occurs in just enough words to be
irritating...

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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: ios vim and plugins

2013-02-17 Thread Chris Lott
On Sun, Feb 17, 2013 at 12:42 PM, Bee fo...@calcentral.com wrote:

 Making progress. I keep trying other ios editors, so far only iText
 Pad is even usable. Still ios vim is much better, but needs DropBox or
 WiFi file sharing support.

Nothing competes with Vim, but I still can't get past the fact
that--most of the time--I can't ever get into insert mode with iPad
Vim and my external keyboard. In the meantime, I use
Textastic...that's the best I've found and it integrates with dropbox.

c

-- 
-- 
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: ios vim and plugins

2013-02-17 Thread Chris Lott
On Sun, Feb 17, 2013 at 7:31 PM, Bee fo...@calcentral.com wrote:
 On Feb 17, 4:07 pm, Chris Lott ch...@chrislott.org wrote:
 On Sun, Feb 17, 2013 at 12:42 PM, Bee fo...@calcentral.com wrote:
 Nothing competes with Vim, but I still can't get past the fact
 that--most of the time--I can't ever get into insert mode with iPad
 Vim and my external keyboard.

 I have never had a problem getting into insert mode, simply the letter
 'i' but have remapped getting out of insert back to normal mode
 because the default ios vim mapping is '\' which is buried 3 levels.

It seems to be a problem with (some?) external keyboards. It works
fine if I just use the on-screen keyboard. A number of us were having
this problem and it was never resolved. I'm not sure that development
of the iPad version of Vim is still going.

c
--
Chris Lott ch...@chrislott.org

-- 
-- 
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: is there an easy way to visual select the just pasted texts?

2013-02-08 Thread Chris Lott
re: Selecting pasted text. If you do a search for re-selecting block
in different buffer you will see some more advice on this topic.

c
--
Chris Lott ch...@chrislott.org

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




Sorting multiple sections

2013-01-31 Thread Chris Lott
I have various markdown documents with with lists contained in sections like so:

One Section


* list item 1
* another
* etc

Second Section
--

* more list items
* etc

The sections are always formatted as the above (level 2 markdown
headers); the lists are of variable length.

What I need to do is figure the most efficient way to sort each list
in each section alphabetically.

Thoughts?

c
--
Chris Lott ch...@chrislott.org

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




changing a type of selection

2013-01-26 Thread Chris Lott
Is there a way to change a selection type from one to the other (say
from visual to visual block mode) without deselecting, choosing the
new type, and then reselecting using a range/movement?

If I accidentally select in visual mode and deselect, then C-v to go
into visual block, the 'gv' command reselects, but in the previous
(block) mode. I'd like something to switch while selected or to make
'gv' keep the new type.

I hope the question makes sense!

c
--
Chris Lott ch...@chrislott.org

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





calling a function on bufenter,bufnew,bufread

2012-12-07 Thread Chris Lott
I have the following in my .vimrc -- but the call to the function
isn't working. If I call the function manually after it opens, it
works fine. The filename is set to vimperator.txt. Do I have to do
something different to call a function in this way?

function! WW()
  :set showtabline=0
  :set noshowmode
  :set laststatus=0
  :set noruler
  :set noshowcmd
  :call VimWriteRoom()
endfunction

nnoremap WW :call WW()CR

au BufNewFile,BufEnter,BufRead vimperator.txt :call WW()cr

c
--
Chris Lott ch...@chrislott.org

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


Re: calling a function on bufenter,bufnew,bufread

2012-12-07 Thread Chris Lott
On Fri, Dec 7, 2012 at 10:43 AM, Ben Fritz fritzophre...@gmail.com wrote:

   au BufNewFile,BufEnter,BufRead vimperator.txt call WW()

 In the future, or if this doesn't solve your problem, it isn't working is 
 not helpful at all

Sorry, I will amend it to the complete problem:

the call to the function in the autocommand did nothing. Happy?

Thanks.

c
--
Chris Lott ch...@chrislott.org

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


Re: calling a function on bufenter,bufnew,bufread

2012-12-07 Thread Chris Lott
On Fri, Dec 7, 2012 at 10:32 AM, Marcin Szamotulski msza...@gmail.com wrote:
 On 06:46 Fri 07 Dec , Chris Lott wrote:
 function! WW()
   :set showtabline=0
   :set noshowmode
   :set laststatus=0
   :set noruler
   :set noshowcmd
   :call VimWriteRoom()
 endfunction

 nnoremap WW :call WW()CR

 Some time ago I used vimperator too, and I also had some additional
 settings for it.  As far as I recall vimperator has its own file type,
 but I might be wrong.  If it has you could use FileType autocommand
 event.

The filetype is set to text. Using the proposed solution of:

au BufNewFile,BufEnter,BufRead vimperator.txt call WW()

almost works: instead of nothing happening when I invoke the
vimperator file, the screen flashes and then it's as if nothing
happened. So the function is now being called. But, as usual, if I
call WW() manually at that point, things work as they are supposed to.
I guess it must be something in the VimWriteRoom() function, which
comes from a plugin. I'll dig around in there and see if I can find
anything.

c
--
Chris Lott ch...@chrislott.org

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


Re: E490: no fold found

2012-12-06 Thread Chris Lott
On Thu, Dec 6, 2012 at 12:42 AM, bernhar...@googlemail.com
bernhar...@googlemail.com wrote:
 I'm using MacVim Snapshot 65 (Vim 7.3.646) on Snow Leopard.

 I wanted syntax highlighting and especially folding for markdown files by 
 headings (#, ##, etc.).

Some answers here should help:
http://stackoverflow.com/questions/3828606/vim-markdown-folding

But I would recommend considering the Pandoc plugin, which handles
markdown folding and adds much more:
https://github.com/vim-pandoc/vim-pandoc

c
--
Chris Lott ch...@chrislott.org

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


Re: scratch buffer opening with a in the command line

2012-12-04 Thread Chris Lott
On Tue, Dec 4, 2012 at 2:02 AM, Marcin Szamotulski msza...@gmail.com wrote:
 On 21:05 Mon 03 Dec , Chris Lott wrote:
 I am trying to modify this script:

 I don't know either.  But you can just add:

 nmap buffer q :quitcr

 after the line with 'mapclear buffer'.  Then you can press q to quit
 the wordnet buffer.

 Maybe c-u could help (:help c^u).

I should have pushed my latest revision out, because that's almost
exactly what I had done! The problem is that pesky  in the command
line, which isn't coming from an accidental C-R...so the first press
of 'q' cancels that.

I tried mapping
nmap buffer q c-u:q
which is the key sequence that works when I do it manually, but no dice.

I can just quit with qq now,  but it's a matter of principle now :)

c
--
Chris Lott ch...@chrislott.org

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


Re: scratch buffer opening with a in the command line

2012-12-04 Thread Chris Lott
On Tue, Dec 4, 2012 at 7:17 AM, Chris Lott ch...@chrislott.org wrote:
 On Tue, Dec 4, 2012 at 2:02 AM, Marcin Szamotulski msza...@gmail.com wrote:
 On 21:05 Mon 03 Dec , Chris Lott wrote:
 I am trying to modify this script:

FYI: I figured this out. It was a stray quotation mark *I* put in the
key mapping to call the function. Argh. Of course it didn't throw any
kind of error so it was all the nut behind the wheel as they say.
Sorry to waste your time!

c
--
Chris Lott ch...@chrislott.org

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


execute edit command

2012-12-04 Thread Chris Lott
Why does this not work?

let dnfile = strftime(%Y) . .md
nmap leaderdn execute 'e ' fnameescape(dnfile)

dnfile is set properly, but when I try to invoke it, it makes a change
to the current buffer...

c
--
Chris Lott ch...@chrislott.org

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


scratch buffer opening with a in the command line

2012-12-03 Thread Chris Lott
I am trying to modify this script:
https://github.com/fncll/wordnet.vim/blob/master/plugin/wordnet.vim

so that I can press `q` to quit.

However, when the scratch buffer opens with the results, there is a
double-quotation mark in the command line that I have to `ESC` out of
before I can do anything. I have no idea what that  means or where it
is coming from.

So, where is it coming from and how can I stop it?

c
--
Chris Lott ch...@chrislott.org

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


Re: email plugin

2012-11-30 Thread Chris Lott
On Fri, Nov 30, 2012 at 1:22 AM, Christian Brabandt cbli...@256bit.org wrote:

 I use several handwritten plugin for fixing wrongly encoded characters
 (e.g. change Ä into Ä and several others),
 Deleting quoted Signatures, adding my Signature, changing subject,
 setting options (textwidth, expandtab, formatoptions), reformatting the
 text, spellchecking (this plugin was made before spell checking was
 available in Vim), inserting special text, as well as custom completion
 for addresses and attaching files (this functionality is available in
 my CheckAttach plugin for use with mutt).

Any chance you would share any of these?

c
--
Chris Lott ch...@chrislott.org

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


Re: email plugin

2012-11-29 Thread Chris Lott
Gmail + Pentadactyl (or Vimperator) works like a charm for me.

c
--
Chris Lott ch...@chrislott.org

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


Re: autocmd pattern exclusion?

2012-11-28 Thread Chris Lott
On Wed, Nov 28, 2012 at 7:31 AM, Matt Martini matt.mart...@gmail.com wrote:
 I have an autocmd that I would like to trigger for all files, except a
 certain file.  Is there a way to write this?

I think this basically answers your question:

http://stackoverflow.com/questions/6496778/vim-run-autocmd-on-all-filetypes-except

c
--
Chris Lott ch...@chrislott.org

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


quicker way to switch and test color schemes?

2012-11-27 Thread Chris Lott
If I have two files open to test a colorscheme, the only way I can get
a true view of the scheme, without artifacts from the previous, is to
run:

syntax reset

each time I try a new colorscheme...

Is there a faster way?

c
--
Chris Lott ch...@chrislott.org

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


Re: Is Vundle dead?

2012-11-25 Thread Chris Lott
On this topic-- is it difficult to move from Pathogen to VAM? Can I
keep my bundle directory of plugins but use VAM with it?

c
--
Chris Lott ch...@chrislott.org

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


why does sourcing my .vimrc is reducing font size?

2012-11-25 Thread Chris Lott
The following are links to my .vimrc and the included function files
(the first for gvim, which is what I am using):

https://github.com/fncll/vimfiles/blob/master/.vimrc
https://github.com/fncll/vimfiles/blob/master/vimrc/mygfuncs.vim
https://github.com/fncll/vimfiles/blob/master/vimrc/myfuncs.vim

The strange thing that is happening is that everything is fine when I
use Vim, generally, but if I make changes to the .vimrc and then
source it (using :so %), the font size gets smaller (as does the
window size) though set guifont? shows the proper size received at
startup. And it appears to be changed globally because it persists
when I open new files. Anyone have an idea what might be triggering
this?

(and apologies if my .vimrc has any issues--I'm poet not a programmer)

c
--
Chris Lott ch...@chrislott.org

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


Re: why does sourcing my .vimrc is reducing font size?

2012-11-25 Thread Chris Lott
On Sun, Nov 25, 2012 at 11:57 AM, Chris Lott ch...@chrislott.org wrote:
 The strange thing that is happening is that everything is fine when I
 use Vim, generally, but if I make changes to the .vimrc and then
 source it (using :so %), the font size gets smaller (as does the
 window size) though set guifont? shows the proper size received at
 startup. And it appears to be changed globally because it persists
 when I open new files. Anyone have an idea what might be triggering
 this?

Answered my own question (and I already had the answer in my own comments):

I needed to set the font upon entering the GUI:
au GUIEnter * set guifont=Source\ Code\ Pro:h16

c
--
Chris Lott ch...@chrislott.org

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


Re: Vim vs GVim

2012-11-19 Thread Chris Lott

Marc Weber wrote:


:h 'guioptions'


What he said. Turn off all the visual cruft and you get the best of both 
worlds...

c
--
Chris Lott ch...@chrislott.org

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


Rewrapping long lined email quotes

2012-11-18 Thread Chris Lott

I'm trying to take email that has quotes with long lines:

 a really long line here that wraps that has no wraps in it and drives 
me crazy


and format them to:

 a really long line here that wraps that has
 no wraps in it and drives me crazy

I've tried the tip(s) at:
http://vim.wikia.com/wiki/Fix_email_quotations_with_long_lines

but I just end up with:

 a really long line here that wraps that has
no wraps in it and drives me crazy

(note the lack of a  on the second line).

This seems like it should be easy, but I am just not making it happen. Help?

c
--
Chris Lott ch...@chrislott.org

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


Re: Subdirectories for help files

2012-11-14 Thread Chris Lott
On Wed, Nov 14, 2012 at 12:46 AM, Marco net...@lavabit.com wrote:
 2012-11-13 Chris Lott:

 Not sure if it's an option, but using a plugin manager like
 [Pathogen](https://github.com/tpope/vim-pathogen) or
 [Vundle](https://github.com/gmarik/vundle) allows you to keep the help
 files in place in that plugin's folder (along with everything else).

 I already use Vundle, but I don't see a difference if I create the
 help and corresponding tag files in ~/.vim/doc or in the bundle
 directory. Files located in subdirectories are not found using
 Vundle, either.

   ~/.vim/bundle/whatever/doc/foo# found
   ~/.vim/bundle/whatever/doc/tags
   ~/.vim/bundle/whatever/doc/subir/bar  # not found
   ~/.vim/bundle/whatever/doc/subir/tags

My point is that, with the plugins each in their own directory, there
is no need to use subdirs for the docs. That makes sense when trying
to keep a single, central doc directory clean, but I don't understand
what you are trying to achieve here.

 are being found, it means there is apparently a way to locate tag
 file outside of ~/.vim/doc. I need to apply the same logic as
 Vundle, just with a different path.

Your original question didn't really make this clear...it sounded like
you wanted subdirs for your collection of doc files. You could look
inside the Vundle plugin and see what its equivalent of :Helptags (I
use Pathogen) does or create a pseudo-plugin in the bundle directory
for each of your tag files.

c
--
Chris Lott ch...@chrislott.org

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


Re: is there an ios vim forum?

2012-11-14 Thread Chris Lott
On Wed, Nov 14, 2012 at 6:21 PM, Benjamin Klein b...@silver-chalice.com wrote:

 There is an app for that:
 https://itunes.apple.com/us/app/vim/id492668168?mt=8

 Given the lack of keyboard and (as Tony mentioned) filesystem access,
 however, I cannot see how it would be of any use.

For those of us who routinely use a keyboard with the iPad, the iOS
Vim could be useful (given the pain of having to sync to get to the
files), but it is too buggy to really use much.

c
--
Chris Lott ch...@chrislott.org

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


Re: how fold all comment line?

2012-11-14 Thread Chris Lott
On Wed, Nov 14, 2012 at 10:05 PM, 王军 wangjun850...@gmail.com wrote:
 Hi everyone:

 I want to fold all line which are comment.

 eg.

 //aa

Something like this?

set fdm=expr
set fde=getline(v:lnum)=~'^\s*\/\/\\\|^\s*$'?1:0

c
--
Chris Lott ch...@chrislott.org

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


Re: Show the list of the files inside the folder of the current file

2012-11-13 Thread Chris Lott
On Tue, Nov 13, 2012 at 5:48 AM, Javier Garcia tirengar...@gmail.com wrote:
 imagine I'm editing file, and I want to show the list of the files inside the 
 folder who belongs the file I'm editing, to edit one of them.

 How can I do that? Is there any way using FuzzyFinder?

Look at:
h :FufFileWithCurrentBufferDir@en

CtrlP is a good, maintained, alternative to FuzzyFinder which has
options so that finding a file can be the file's current working
directory (or a few other options).

You could also look at
:h acd
if that works with your plugins.

c
--
Chris Lott ch...@chrislott.org

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


Re: Show the list of the files inside the folder of the current file

2012-11-13 Thread Chris Lott
On Tue, Nov 13, 2012 at 7:32 AM, Javier Garcia tirengar...@gmail.com wrote:
 I meant when I open a new tab

I don't understand the question. Do you want to open a file in a new
tab from Fuzzy File finder? Then use ctrl-l

Otherwise, what are you opening in the new tab? If nothing, then your
current working directory is your home directory and that's what
FuzzyFile finder shows. There is no folder that belongs to the file
I'm editing because you have no file open.

 What directory do you want it to be if you have nothing in a buffer?
How is Vim to know?

c
--
Chris Lott ch...@chrislott.org

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


Re: Subdirectories for help files

2012-11-13 Thread Chris Lott
On Tue, Nov 13, 2012 at 12:22 PM, Marco net...@lavabit.com wrote:
 Hi,

 I have plenty of help files in my .vim/doc directory. I'd like to
 structure it a little more. Apparently simply placing the files in
 subdirectories is not sufficient. The help tags can not be found. Is
 there a way to either

Not sure if it's an option, but using a plugin manager like
[Pathogen](https://github.com/tpope/vim-pathogen) or
[Vundle](https://github.com/gmarik/vundle) allows you to keep the help
files in place in that plugin's folder (along with everything else).
Much cleaner, more portable

Just a thought.

c
--
Chris Lott ch...@chrislott.org

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


speeding up dictionary completion

2012-11-12 Thread Chris Lott
I have the following lines in my .vimrc

au BufNewFile,BufRead *.md setlocal dictionary+=/usr/share/dict/words
au BufNewFile,BufRead *.md setlocal complete+=k

It is understandably slow the first time I attempt a completion...as in minutes.

Are there methods to speed this up? Can I pre-cache the words file in
some way? I find the dictionary completion very useful, but not at
this pace!

c
--
Chris Lott ch...@chrislott.org

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


Re: Commands from insert mode

2012-11-11 Thread Chris Lott
On Sun, Nov 11, 2012 at 12:52 AM, Anthony Campbell a...@acampbell.org.uk 
wrote:


 Sorry if it is uncharitable, but I still find it difficult to understand
 how it is possible to write extended prose from scratch without making
 numerous corrections,

The question is *when* (or *if*) those corrections and changes are
being made. Whether writing by hand or with the keyboard, the drafting
stage (or the at speed stage, as you put it), doesn't necessarily
involve much in the way of correction or the need to go out of insert
mode in significant ways. If the whole process *stops* at the drafting
stage, then there's a real problem.

I know I'm not the only writer who finds it makes my work weaker if I
don't allow myself this free drafting stage. If I let myself get
caught up in editing at that most creative and fertile point, my
writing is weaker.

The odd thing about Vim in this respect is that editors featuring a
typewriter mode for drafting have become commonplace...but this is
essentially what Vim is for beginners...once they get into Insert mode
and aren't sure how to get out.

c
--
Chris Lott ch...@chrislott.org

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


Re: Macro / Function to draw a set of characters below the line above

2012-11-11 Thread Chris Lott
On Sun, Nov 11, 2012 at 1:21 PM, Keith Christian
keith1christ...@gmail.com wrote:
 Example:


 This is a section title, and the row of equal signs below it must be
 of the same length as this text
 


 I'm looking for a function to do this to reduce the tedium.  Would
 like to bind this new function to a key so it's quick to execute, say,
 Ctrl-F1 or some such.

You could also check out SnipMate -- there are snippets for Markdown
and Pandoc that do exactly this for top level (=) and second level (-)
headers.

c
--
Chris Lott ch...@chrislott.org

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


Re: Commands from insert mode

2012-11-10 Thread Chris Lott
On Sat, Nov 10, 2012 at 6:37 AM, Anthony Campbell a...@acampbell.org.uk wrote:
 On 08 Nov 2012, Ed Kostas wrote:

 [snip]

 In the world at large, besides the engineer, there are creative
 writers who seldom move the cursor, or even erase characters, or make
 corrections. These people just type forward.


 I find the thought of creative [sic] writers who almost never make
 corrections deeply depressing although perfectly believable in the
 light of the sloppy verbose writing I encounter these days, even in
 books from well-known publishers.

That might be the least charitable way of interpreting the original
comments. I took it to mean that writers of prose tend to write
forward a lot more often and for longer durations than, perhaps,
programmers do. But not necessarily that this is the *only* way in
which they work.

I write almost nothing but prose (using Markdown). Vim works quite
well for that. But I do understand, particularly when drafting, that
the bouncing between insert and normal modes adds a bit of friction.
It took me a long time to switch from Emacs because at the drafting
stage it remained more efficient than Vim. In terms of pure speed
while drafting, a non-modal editor is probably technically more
efficient in some ways, but overall it's a win.

I'm still working on methods to make that stage of my writing process
more efficient. I absolutely understand the desire to make normal mode
more suited to that particular way of working (recognizing that there
are, hopefully, further editing stages involved :) It has helped me to
consider Vim a text processing engine rather than an editor.

c
--
Chris Lott ch...@chrislott.org

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


Re: Alternatives to codepad.vim

2012-11-10 Thread Chris Lott
On Sat, Nov 10, 2012 at 12:03 PM, Bradley D. Thornton

 Or maybe I'll start using gvim ;) I'm a little aprehensive that all
 those smart icons and menu items are there since I'm not used to having
 my hands leave the keyboard when I'm working :)

No need to do anything different. And you can kill the icons and menus with:

:set guioptions-=m  remove menu bar
:set guioptions-=T  remove toolbar
:set guioptions-=r  remove right-hand scroll bar

c
--
Chris Lott ch...@chrislott.org

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


Re: sourcing functions in file with has gui_running from .vimrc

2012-11-04 Thread Chris Lott
On Sun, Nov 4, 2012 at 7:56 AM, Tony Mechelynck

 If these options are set correctly and you still don't see the tabs, then
 another possibility is that Vim would set 'guitablabel' and 'guitabtooltip'
 to some default (or empty) value at GUI startup. To counteract this, you can
 set them at the GUIEnter autocommand event:

 if has('gui')  has('autocmd')  has('windows')
 au GUIEnter * set gtl=%{GuiTabLabel()} gtt=%{GuiTabTooltip()}
 endif

Thanks. It's interesting that, as originally written, if the code was
in the .vimrc it worked, but if included in a separate file it did not
unless I use the GUIEnter command...

But it worked! Thanks!

c
--
Chris Lott ch...@chrislott.org

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


Re: Snippet for adding closing parentheses in ultisnips

2012-11-04 Thread Chris Lott
On Sun, Nov 4, 2012 at 9:10 AM, Marco net...@lavabit.com wrote:

 How can I fix the snippet to work with and without space after
 the function name? Or is there a better way to achieve that?

Unless I am misunderstanding, you could use delimitmate
[http://clinki.es/go/Pf] which does the completions and puts the
cursor inside...plus when you get to the end you just type the closing
character and it jumps over that closing character. Much easier than
CTRL-J for me.

c
--
Chris Lott ch...@chrislott.org

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


Re: Snippet for adding closing parentheses in ultisnips

2012-11-04 Thread Chris Lott
On Sun, Nov 4, 2012 at 10:08 AM, Marco net...@lavabit.com wrote:
 2012-11-04 Chris Lott:


 The only thing that bothers me is that the default key combination
 to jump over delimiters is S-Tab. I'd like to map it Ctrl-j.
 Then it works in a consistent fashion with the other jumps. How can
 I achieve that?

I can't help you there...

 As you mention, typing the closing character is also possible. This
 is not feasible in my opinion. You have to type the open character,
 the text in between and then the closing one. What do you need the
 plugin for? And the closing characters are sometimes, e.g. ) much
 harder to reach than Ctrl-j which completely lies on the homerow.

I find reaching for the CTRL-j to be more of a pain than almost any
punctuation! But either way it's a single keystroke and I see the
utility of any of these methods as much for proper balance as for
easing the placement of a second character.

c
--
Chris Lott ch...@chrislott.org

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


search and replace using a list of characters to replace

2012-11-03 Thread Chris Lott
I have a large text file in which I need to remove all punctuation,
all special characters (smart quotes) and the like, and a bunch of
selected words.

Can this be done within Vim?

c
--
Chris Lott ch...@chrislott.org

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


Re: A Vim set question

2012-11-03 Thread Chris Lott
On Sat, Nov 3, 2012 at 9:36 PM, stosss sto...@gmail.com wrote:
 Are these different or the same? I don't see anything different in my display.

 set display+=lastline
 set display=lastline

The first *adds* the lastline option to the list of display options

The second sets the display setting to lastline  (only)

If you don't have or need any other options for display, then they are
functionally equivalent.

To be honest, I'm not sure how settings would be mixed--the only other
display option I have seen is uhex and I have no idea if lastline and
uhex can co-exist

c
--
Chris Lott ch...@chrislott.org

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


xa and abandon unnamed buffers

2012-11-02 Thread Chris Lott
Is there a command that will write and exit all buffers *and* abandon
unnamed buffers? xa almost gets there, but it fails if there are
unnamed buffers.

c
--
Chris Lott ch...@chrislott.org

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


Re: mapleader question

2012-11-02 Thread Chris Lott
If you set mapleader to another chracter, you do the same thing you
have been doing with /A but you replace the '/' with the new
mapleader.

So, if you:
let mapleader = ,

Then you would type
,A


c
--
Chris Lott ch...@chrislott.org

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


Re: mapleader question

2012-11-02 Thread Chris Lott
On Fri, Nov 2, 2012 at 5:47 PM, stosss sto...@gmail.com wrote:

I might just not understand the question. Let me try again:

 My question is this:

 I see some examples in email here that show:

 LeaderA

 or some other character besides A

 what key do I use if my map looks like that?

Unless you have changed the leader key using the mapleader=X command,
then you would type:
\A

 right now some of my maps actually have \ as the first key to press
 some have the F key or Shift F key.

If you haven't changed the leader key, then you would press
\\
in the first instance.

Leader is just a way to say: whatever leader key I have defined
and so is used by plugins and the like to do keymapping so they can
adapt to whatever leader you have defined.

Could you post a couple of the maps you are talking about? Because X
is the first key to press is ambiguous: do you mean X is the key that
is mapped or X is the key that is to be pressed after pressing the
Leader? As it stands, you could mean
map F foobar
OR
map LeaderF foobar

 Why are some maps set up like so:

 LeaderA

So that the code is portable (see above). For instance, I can drop
nnoremap LeaderA foo
into my code and it works fine no matter what leader key I have
defined (I use the comma), so I would press
,A
where you would, if you haven't changed it, press
\A

c
--
Chris Lott ch...@chrislott.org

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


GUI Tab Tooltip: list buffers

2012-10-31 Thread Chris Lott
I pilfered the following code that is supposed to show a buffer list
as the tooltip on the tabs, but it is not working. Any ideas?

I can see the buffers with :buffers and with ctrlP buffer list, so I
know they are there, but they are not showing as the tooltip. Am I not
understanding what this code *should* do?

***


  make those tooltips cool by showing buffer names within them
  function! GuiTabToolTip()
let tip = ''
let bufnrlist = tabpagebuflist(v:lnum)
for bufnr in bufnrlist
   separate buffer entries
  if tip!=''
let tip .=  \n 
  endif
   Add name of buffer
  let name=bufname(bufnr)
  if name == ''
 give a name to no name documents
if getbufvar(bufnr,'buftype')=='quickfix'
  let name = '[Quickfix List]'
else
  let name = '[No Name]'
endif
  endif
  let tip.=name
   add modified/modifiable flags
  if getbufvar(bufnr, modified)
let tip .= ' [+]'
  endif
  if getbufvar(bufnr, modifiable)==0
let tip .= ' [-]'
  endif
endfor
return tip
  endfunction

show tooltips on tabs
  set guitabtooltip=%{GuiTabToolTip()}

***

c
--
Chris Lott ch...@chrislott.org

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


re-selecting block in different buffer

2012-10-30 Thread Chris Lott
The gv command is very useful. I'd like to be able to reselect a block
after I have selected, cut, and pasted it into a different buffer.

Is this possible?

c
--
Chris Lott ch...@chrislott.org

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


surround a visual block with character(s)

2012-10-28 Thread Chris Lott
What's the most efficient way to visually select a block of text and
append/prepend a character or more?

In other words, I often want convert this:

blah blah foo foo

to

blah blah foo foo

I assume there are plugins that help with this kind of thing, for
which suggestions are welcome, but I'm curious how to do this most
efficiently without them.

c
--
Chris Lott ch...@chrislott.org

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


Re: Write/Print PHP localhost results to file

2012-10-27 Thread Chris Lott
On Sat, Oct 27, 2012 at 12:10 AM, Gerg safalt...@gmail.com wrote:
 Hello again and thank you for your replies. I apologise if I was unclear 
 enough.

 This is why I am asking that:

 1. I have a PHP file which I am running localy.

 2. However when I run PHP file, there is so much data that every web browser 
 crashes and it does not finish loading the page.

I don't understand why you don't just have your PHP script, when
invoked, write to the file. You could optionally redirect the browser
to that file contents afterward or have an interstitial page that does
so, etc.

Depending on the need, you could also have CRON run the PHP script (on
the command line or through wget or curl or whatever) at whatever
interval makes sense and just point the browser to the HTML file that
results.

I don't see why Vim is or should be any part of this.

c
--
Chris Lott ch...@chrislott.org

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


Re: Write/Print PHP localhost results to file

2012-10-26 Thread Chris Lott
On Fri, Oct 26, 2012 at 5:49 AM, Gerg safalt...@gmail.com wrote:
 Hello everyone. I am new to VIM.

 I would like to write/print my PHP localhost results to *.txt or HTML file. 
 Is that possible?


You could capture PHP CLI output:
:read !php -r 'phpinfo();'

Or from localhost or any other site:
read !wget -q -O - http://yoursite.dom/

c
--
Chris Lott ch...@chrislott.org

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


LanguageTool plugin issue [was Re: vim, spell check, smart quotes]

2012-10-07 Thread Chris Lott
On Sat, Oct 6, 2012 at 10:15 PM, Dominique Pellé
dominique.pe...@gmail.com wrote:

 Or you can also use the LanguageTool plugin
 which not only does grammar checking in Vim but
 now also does spell checking (since LanguageTool
 version 1.8) using either Hunspell of FSA (Finate
 State Automaton http://stevehanov.ca/blog/index.php?id=115)
 dictionaries:

 http://www.vim.org/scripts/script.php?script_id=3223

This looks like the most intriguing route. However, after installation
of the plugin, I get the following error:

java -jar /Users/chrislott/Dropbox/apps/unix/languagetool/LanguageTool.jar
-c utf-8 -d WHITESPACE_RULE,EN_QUOTES -l en --api /var/f
olders/y3/tfx06t6d0kx425gqyhrgv4nwgp/T/v6Jgs8o/0] failed with error: 1

Any idea how to troubleshoot this?

c
--
Chris Lott ch...@chrislott.org

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


vim, spell check, smart quotes

2012-10-06 Thread Chris Lott
Does anyone know how I can get spell check within Vim to handle
smart quotes (i.e. typographically correct ones) properly?

For instance, spell check in Vim doesn't flag a word like:
don't

but it does flag the smart quote version as incorrect:
don’t

c
--
Chris Lott ch...@chrislott.org

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


Re: Folding on markdown headers

2012-05-27 Thread Chris Lott
On Sun, May 27, 2012 at 8:10 AM, Eric Weir eew...@bellsouth.net wrote:


 I'm intrigued by pandoc. My reason for going with straight markdown at the 
 moment is that I use Scrivener for larger writing projects and Scrivener 
 relies on multimarkdown, and extension of markdown, to convert Scrivener 
 documents to LaTGeX.


The beauty of the Pandoc plugin (and the Pandoc converter) is that you
can use it and still use only markdown or multimarkdown as your
markup, but it gives you a bunch of additional features anyway. I work
pretty much only in Markdown, but Pandoc plugin is a godsend.

And if my needs go past what Markdown can do, I just keep using Pandoc
and use features it supports beyond the Markdown syntax...

c
--
Chris Lott ch...@chrislott.org

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


Re: Folding on markdown headers

2012-05-26 Thread Chris Lott
On Sat, May 26, 2012 at 1:54 AM, Eric Weir eew...@bellsouth.net wrote:

 Thanks, sc. Definitely does. I assumed the behavior was anomalous. Someone, I 
 think Chris, suggested earlier that a simple :e would do the trick, and it 
 seems to do so. [Is that a shortened version of the command you suggest?]


:e is essentially equivalent to file open in other editors -- so
when you use the command :e without a file name it opens (reloads) the
current file (see more on the command using :help :e)

What you are running into is that Vim has no way to automatically knew
the filetype of your file unless it can do so by recognizing the file
extension (or a modeline at the beginning or end of a file). So when
you start a new file and save it with the proper extension, the :e
reloads the file, recognizes the type, and Vim acts accordingly. In
other words, it does the same thing that you are doing when you set
the filetype automatically...

c
--
Chris Lott ch...@chrislott.org

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


Re: motion t} does not work

2012-05-02 Thread Chris Lott
On Wed, May 2, 2012 at 6:55 AM, Ben Fritz fritzophre...@gmail.com wrote:
 On Wednesday, May 2, 2012 7:33:15 AM UTC-5, runner wrote:

 Is there a way to quickly select all text starting from the current
 position of the cursor to the specified character even if the
 specified character is not on the same line?


 Use a / search.

Or EasyMotion: http://www.vim.org/scripts/script.php?script_id=3526

c
--
Chris Lott ch...@chrislott.org

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


changing text width based on window size

2012-03-09 Thread Chris Lott
I'd like to come up with a method to toggle between the current window
size and text width and a maximized window with a different text
width. I have no idea how to proceed. Are there methods to read the
current window and textwidth and store them so I can toggle back?

c
--
Chris Lott ch...@chrislott.org

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


Re: changing text width based on window size

2012-03-09 Thread Chris Lott
On Fri, Mar 9, 2012 at 9:12 AM, Ben Fritz fritzophre...@gmail.com wrote:

 You can access textwidth (and any other option) by prepending a , e.g. :let 
 myvar = textwidth.

 Why do you want to do this? 'textwidth' affects the placement of hard returns 
 in a file, it
 should not change based on temporary window size, and changing it will not 
 affect the existing text.

Well, what I am wanting to do is have the whole text block
centered--eg in the middle of the screen not center aligned-- in
full-screen mode so there are equal(ish) margins on the left and
right. You are right that I guess I do not want textwidth...I don't
want this to result in a text file that is centered so, just as the
display for typing...

c
--
Chris Lott ch...@chrislott.org

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


Re: Vim for LaTeX

2012-03-02 Thread Chris Lott
On Wed, Feb 29, 2012 at 1:47 AM, Eric Weir eew...@bellsouth.net wrote:

 My reason for being interested in mmd is {1] I'm not a programmer, [2] I
 compose in and manage larger writing projects with Scrivener, which provides
 for export to latex via mmd, [3] I'm primarily interested in being able to
 use latex to format and print/publish short documents composed in vim.

I wonder if there isn't some kind of misunderstanding? You can use
vim-pandoc with markdown or multimarkdown. Which means you can use
Markdown and generate the print version using the pandoc program to
create LaTeX or HTML or just to clean up and normalize your
markdown/multimarkdown code. Pandoc as a markup adds some things to
the markdown/multimarkdown base, but the engine seems to have
everything I have thrown at it from md/mmd.

The pandoc plugin provides some syntax highlighting and other goodies
to help speed along the process writing in any of the markups.

c
--
Chris Lott ch...@chrislott.org

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


Re: multiple autocommands

2012-02-14 Thread Chris Lott
On Tuesday, February 14, 2012, Ben Fritz fritzophre...@gmail.com wrote:


 On Feb 13, 3:11 pm, Chris Lott ch...@chrislott.org wrote:
 Is there a more efficient or better way to cluster together a set of
 autocommands in my .vimrc? For instance, I have the following:

 au BufNewFile,BufRead *.mtxt setlocal filetype=pandoc
 au BufNewFile,BufRead *.mtxt setlocal spell
 au BufNewFile,BufRead *.mtxt setlocal equalprg=pandoc\ -t\ markdown\

 Are you looking to create a filetype plugin?

Maybe...I'll look into that. I was hoping that I could keep it simple and
use augroup, but that seems to depend on the filetype already being set,
which is happening with the vim-pandoc extension. I think. It's rather
confusing to me still.

At least I know now I can put multiple items on the same line, which helps
a bit!

c
--
Chris Lott ch...@chrislott.org

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


multiple autocommands

2012-02-13 Thread Chris Lott
Is there a more efficient or better way to cluster together a set of
autocommands in my .vimrc? For instance, I have the following:

au BufNewFile,BufRead *.mtxt setlocal filetype=pandoc
au BufNewFile,BufRead *.mtxt setlocal spell
au BufNewFile,BufRead *.mtxt setlocal equalprg=pandoc\ -t\ markdown\
--reference-links\ --no-wrap

c
--
Chris Lott ch...@chrislott.org

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


Re: Dvorak

2012-02-12 Thread Chris Lott
On Sun, Feb 12, 2012 at 6:02 AM, Paul google01...@rainslide.net wrote:
 On Thursday, 09 February, 2012 at 19:50:41 GMT, Ben Fritz wrote:

 This one recently helped me [decide to give up on Dvorak]:

Has there been some new evidence since this?
http://www.utdallas.edu/~liebowit/keys1.html

I've always been told that the superiority of Dvorak was a myth. I've
yet to see anything that makes me think otherwise!

c
--
Chris Lott ch...@chrislott.org

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


  1   2   >