About Kent Cowgill
Articles filed under...
abs ab_ripper andylester arms back baggyshorts bestpractices bike blog bugs bus calculator cardio catalyst cgi chart chest chinups code cpan datamodel dbi doctor documentation exercise exhaustion fitness flattire flat_tire google gps heart_rate helmet history houston html humor journal kate kenpo_x kettlebell knees lazy legs lisa lisanne maps math matthew michaelmckenna mom montreal motivation movie mysql oops orm P90X pain park patellar_tendonitis patrick perl phb photos physical_therapy plyometrics poor_gait presentation procrastination pullups pushups pyramid rabbits racecondition rant refactor rest ribs ride route running shoulders situps slides sore spike sql statistics syntax test testing textile timex training triceps ups versioncontrol video vim vimrc walk warren work workouts yapc yapcna2007 yoga youtube

A R C H I V E S

(5)
(15)
(16)
(25)
(3)
(4)
(2)
(4)
(11)
(1)
(1)
(3)
(2)
(2)
(10)
(5)
(2)
(3)
(4)
(9)
(21)
(3)
(3)
(1)
(6)
(4)
(1)
(4)
(3)
(2)
(1)

    Is Kent Cowgill Online?
    View Kent Cowgill's profile on LinkedIn
    Add to Technorati Favorites

    Recent Entries...

    On track so far...

    The week is about half way over, and so far I haven't skippe...

    My pants are on fire!

    I lied. Friday evening I didn't do anything. Saturday ...

    Playing catch-up

    It's been a while since I've updated my P90X progress. A ...

    Re: Yoga kicks my butt

    You should try a different yoga mat. I highly recommend the...

    Yoga kicks my butt

    It's time for a confession. I haven't done an entire Yoga...

    Recovery week comes in the nick of time

    Since it's been a few days, and I know I've rearranged my in...

    Early to Bed, Early to Rise

    So I'm not exceptionally healthier, wealthier, or wiser. Bu...

    Chest and Back, week 3

    Sure, the date that's listed for this post is 10/28, but it'...

    No Procrastination, Some Pain, Some Gain

    After much cajoling and self-flagellation, I convinced mysel...

    Odd Math

    I must be counting something wrong. Granted, I haven't be...

    weblog | `web·lôg -läg |
    noun
    Another term for BLOG
    ORIGIN 1990s: from web in the sense [World Wide Web] and log in the sense [regular record of incidents.]
    blog | bläg |
    noun
    A web site on which an individual or group of users produces an ongoing narrative.
    ORIGIN a shortening of WEBLOG.

    Vim autocomplete

    Kent Cowgill

    So, being able to use autocomplete in vim saved me a load of typing last night, though I suppose it still wore out my pinky hitting 'tab'.

    Do you prefer spaces to indent your code?

    Have no reason to ever insert a tab into your source?

    Enter vim's autocomplete a la bash style tab completion.

    
    
    inoremap <tab> <c-n>
    
    
    
    

    While you're editing, if you want to enter a symbol that already exists in the file, type the first few characters and hit tab. If there's only one match, it gets autocompleted. If there are more, vim (at least version 7, maybe earlier versions) will display a drop-down with all potential autocomplete words. Use the tab or arrow keys to highlight your desired match, then keep typing.

    You might also want to change the color(s) of the drop down menu. This is handled with the following highlight group:

    
    
    highlight Pmenu ctermfg=1 ctermbg=4 guibg=grey30
    
    
    
    

    You might also not want to use the tab key, because you're too busy indenting your code with tabs. If this is the case, please stop doing that.

    Related Photos: None

    Main Page | Login

    Do you want to buy me ? Find more gift ideas at my wishlist