3 ms·
I'm the author of the linked article (and of the ViEmu products). Thank you guys for taking some time to read it. The funny thing is that having vi/vim editing
by jng 19y ago
I'm the author of the linked article (and of the ViEmu products). Thank you guys for taking some time to read it.
The funny thing is that having vi/vim editing inside Visual Studio is bringing in new converts:
http://www.jpboodhoo.com/blog/GettinJiggyWithVIM.aspx http://www.jpboodhoo.com/blog/GettinJiggyWithVIM.aspx
http://www.jpboodhoo.com/blog/HookedOnVIM.aspx http://www.jpboodhoo.com/blog/HookedOnVIM.aspx
Of course I'm not impartial, but I would recommend you consider giving it a try if you have access to vi, vim, or emulation for them in your IDE (and some time).
I miss having it in Firefox textareas (such as when typing this comment). I don't like using an external text editor for this - integration is everything to me. I'd happily pay for it, and I'm sure others would, too, although of course it's not a big market. Anyone up to the task?
- LogicHoleFlaw 19y agoFirst, thank you for writing this article. It's the best explanation I've seen of what vi is all about. I'm pointing several friends at it today to help explain my vim addiction. Your graphical cheat-sheet is also excellent. (http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial.html http://www.viemu.com/a_vi_vim_graphical_cheat_sheet_tutorial... for those following along) When I started learning vim I printed it out and it's still hanging on my cube wall. It really captures a lot of the mnemonics and helped me get up to speed quickly. I was forcibly introduced to vi when I was doing some system administration on some AIX machines. Emacs was not available and I'm not even sure if something as simple as pico was. Since I was going to be doing a lot of work on these boxes I decided to learn vi. It was one of the best computing decisions I've ever made. I've been using vim for about two years now and everything has just become instinctive. When I'm using another editor I just feel crippled. I still feel like there's a lot I can still learn - I try to pick up a new trick at least once a week. Here's my current list of tricks from my .vimrc file. I still tweak it but it's pretty stable these days. " enable vim goodies set nocompatible " tab policy: spaces only, 4 per indentation level " (company policy, don't flame me) " use language-sensitive indentation where available " use :retab to fix nonconforming files set tabstop=4 set shiftwidth=4 set shiftround set expandtab set smarttab " use syntax highlighting filetype on syntax enable " use auto-indentation set cindent set ai set number " misc options set matchpairs+=<:> " bounce matching angle brackets on % set hidden " don't kill buffers, just hide them set incsearch " incrementally search (firefox does this too) set ignorecase " ignore capitalization when searching set scrolloff=5 " scroll the screen to keep the cursor more than 5 lines in set showbreak=\ " display wrapped lines with a leading '\' set breakat-=- " allow wrapping words at '-' set linebreak " allow word wrapping " colorscheme desert " previous favorite colorscheme colorscheme vibrantink " current colorscheme borrowed from textmate " include arc support (via plugin from the anarki) au bufnewfile,bufread *.arc set ft=arc " show all matching files when expanding wildcards set wildmode=longest,list " don't display the graphical toolbar (it annoys me) set guioptions-=T " ********** Custom Keybindings ******************** " CTRL-k and CTRL-k move the current line up or down nmap <silent> <C-j> :m+<CR> nmap <silent> <C-k> :m-2<CR> imap <silent> <C-j> <C-O>:m+<CR><C-O> imap <silent> <C-k> <C-O>:m-2<CR><C-O> " backwards-kill-word idea cribbed from Steve Yegge " hit CTRL-h (insert and normal mode) to delete the word " you are currently typing. It's faster than backspacing. nmap <silent> <C-h> ciw map! <silent> <C-h> <Esc>ciw " hit F1 to toggle match highlighting map <F1> :set invhlsearch<CR> " linux friendly: paste the current X selection on middle mouse button map <S-Insert> <MiddleMouse> map! <S-Insert> <MiddleMouse> " ************* Load Plugins ***************** " start matchit source $VIMRUNTIME/macros/matchit.vim " Toggle the TagList nnoremap <silent> <F8> :TlistToggle<CR> let Tlist_GainFocus_On_ToggleOpen = 1 let Tlist_Exit_OnlyWindow = 1 let Tlist_Use_SingleClick = 1 let Tlist_Process_File_Always = 1 " Toggle BufExplorer map <F9> \bs let g:bufExplorerShowDirectories=0 " Don't show directories. let g:bufExplorerSplitBelow=1 " Split new window below current let g:bufExplorerSplitHorzSize=0 " Use this many lines for the window let g:bufExplorerUseCurrentWindow=1 " Open using current window
- jng 19y agoThanks for your kind comment! I'm glad the article and cheat sheet are useful and appreciated. I got started with vi(m) about 3 years ago. I did actually do some development on AIX over 10 years ago (that system looked like a washing machine!), but I didn't get hooked with vi(m) until I really did a lot of development on a laptop with horrible keys: http://blog.ngedit.com/2005/06/03/the-vi-input-model/ http://blog.ngedit.com/2005/06/03/the-vi-input-model/ Your .vimrc is much more complex than mine! But very nice in any case, I should steal a trick or two from there. A detail I remember about the AIX system headers: their math.h defined a function called 'class'. I had to do some #defining around that to get them to work with the C++ compiler! It was '96 or so, so they should have taken C++ into account already. Duh. At least it wasn't as horrible as windows.h and its accomplices.