mentby.com
Blog | Jobs | Help | Signup | Login

loading
Hi vimmers,

I'm editing a fairly lengthy manpage, so I'd like to be able to use vim
folding to make the task easier.

I'd like to use fdm=fold-marker, to make my folds persistent, but I
can't figure out how to make this compatible with troff-style comments.

If I select a set of lines and press zf, vim folds the lines and adds
/*{{{*/ and /*}}}*/ to the first and last lines respectively (which were
blank before the fold).

For manpage code, I want that to be .\"{{{ and .\"}}}, since troff
comments are lines beginning with dot backlash doublequote.

Reading vim's online help for foldmarker, I see that I need to set
commentstring.  But what syntax should I use to specify the backslash
and quote characters?

I tried set commentstring=.\"
and set commentstring=".\\\""
and set commentstring='.\\\"'
but none of these worked.

There's probably an obvious solution here, but I'm not seeing it.

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

Read more »

source command

Wed, 31 Oct 2012 19:09:24 -0700 Post Comments

Probably inspired by the source or dot command found in most Unix shells.

--
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
But the thing is, for the kind of users vim is aimed at, a text editor
isn't the kind of tool that is used so infrequently that the user is
always stuck at the newbie stage.

I think there's a place for "user-friendly" or "intuitively obvious"
applications, but it's for things that you don't use every day and
therefore don't have a chance to develop any "muscle memory" or other
expertise.  A disk recovery app, for example, needs that kind of
interface because it's aimed at a problem that hopefully doesn't come up
very often. But when it does we're already frustrated and don't want to
have to learn how to use an arcane piece of software.

A software developer, on the other hand, spends a large portion of his
time in his text editor.  It's his "home base."  What Alan Cooper once
called a "sovereign app."  With apps like that, what's wanted is an
interface that doesn't insist on calling attention to itself, but
instead recedes into the background so the user can focus all of his
attention on the task.  Otherwise it's like trying to play the piano
while looking at your hands instead of the sheetmusic (or hearing the
song in your head.)

People who don't work with text all that much or very often can be quite
content with Nano, Notepad, or even simpler interfaces.  You don't need
vim to send text messages or tweets!

But other people find those "user-friendly" apps too confining, and
almost as awkward to use as an on-screen keyboard to be pecked at with a
stylus.

--
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
Profile Widget
Copy and paste this HTML code to your blog or website: