On Mon, Apr 11, 2011 at 06:41:34PM -0400, AK wrote:
> On 04/11/2011 05:04 PM, Adam Monsen wrote:
>> Erik Christiansen wrote:
>>> Simply capitalising keywords in the file allows rapid access to the
>>> desired information
>>
>> How does that work? Will you share an example?
>>
>> Also, will you share your .vimrc?
>>
>
> I think Erik simply meant searching for Mykey will skip mykey and
> thisismykey matches.  -Rainyday

Yes, spot on, but a little more structure helps. To still allow use of
"Mykey" at the start of a sentence, I mostly use fullcaps and colons for
search keys. e.g. section headings:

VIM:--------------------------------------------------------------------


For subsections, I prefer mixed case headings, so either add a tag at
right, or search for "^Cursor" or "Cursor:" subheadings:

Cursor:                        # In .vimrc:                      CURSOR:
   :let loaded_matchparen = 1  " Clobber confusing red & blue crap
                               " on ([{}]).

   :NoMatchParen               # From within vim.

                                        MODE-INDICATING BICOLOUR CURSOR:
   "Appearance:   (Insert_Mode == Green, Normal_Mode == Red)
   if &term =~ "xterm"
      let &t_SI = "\<Esc>]12;green\x7"
      let &t_EI = "\<Esc>]12;red\x7"
   endif

                          -------------------

Embedded search tags also harmlessly hang about on the right:

   ^]    Jump to function/macro under cursor          # With ctags  CTAGS
   :ts   Tag select, from multiple tag matches.
   g]    ditto                                                 DEFINITION
   ^T    An easy way back.

So whether I think of ctags, or "I want the function definition", I have
a search key to take me there immediately. (The file has all my unix
notes, and runs to 15,000 lines. With everything in one file, there's
only one place to look, and whether vim or awk offers a solution is just
"How". I'm looking for "What" could solve my problem.)

I haven't gone to the extent of tweaking .vimrc, since these dead simple
tags have sufficed for over 15 years now, providing a shortcut to stuff
I think I might need again, and took too long to find the first time.

Erik

-- 
manual, n.:
A unit of documentation. There are always three or more on a given item.
One is on the shelf; someone has the others.
The information you need is in the others.              -- Ray Simard

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

Reply via email to