Hacker News new | past | comments | ask | show | jobs | submit login

I do roughly this too, except my vimrc is about 8 lines. I type it out from memory every time I use a new machine.



Would you mind sharing it? Im just getting to grips with vim so any pointers towards some simple improvements would be much appreciated.


Sure:

  set ts=4
  set sw=4
  set softtabstop=4
  set expandtab
  set hlsearch
  set incsearch
  set wildmode=longest,list
OK, only 7 lines then :)

Basically: tabs are 4 spaces, searching works better, and tab completion works like bash.


Oh no, I need at the very least timeoutlen, visualbell and line number. I type that manually when I SSH if I must. Don't want to wait for ESC, no beeps at all and I wanna know where I am on the document.

And lots more is needed for decent Vim IMO. smartcase, set hidden, etc.


I read that most people only use about 10% of vim's features, but everyone uses a different 10% :)


relativenumber is essential too, unless you like typing something like d-638-<Shift>-G just to delete 15 or 20 lines of text.


I actually think lack of line numbering is essential, because I quite frequently want to select blocks of code with the mouse and yank into the clipboard.


That is true, but you can integrate tmux and vim with the system's clipboard. Then again, :set nu! is easy to type.


Thank you!


Take a look at the vim-sensible plugin. No need to install it, just see what the generally agreed sensible settings are.


Most of vim-sensible is already default or equivalent on Neovim, fwiw.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: