Author:
erics, November 26th, 2019
To create indents with 4 space characters which are entered by pressing the TAB key:
|
set tabstop=8 softtabstop=0 expandtab shiftwidth=4 smarttab |
To make the above settings permanent add to your ~/.vimrc file. For more details on any of these see :help ‘optionname’ in vim (e.g. :help ‘tabstop’) tabstop The width of a hard tabstop measured in “spaces” — effectively the […]
Categories: How-To's, Technology Tags: convert, expandtab, howto, shiftwidth, smarttab, softtabstop, Space, spaces, Tab, Tabs, tabstop, tips, vi, vim
|
No comments
Author:
erics, January 11th, 2019
In the normal vim mode, typing gg=G will reindent the entire file. == will re-indent just the current line. http://vim.wikia.com/wiki/Fix_indentation
Categories: How-To's, Technology Tags: Auto-indent, Format, howto, Indent, perl, re-indent, Reformat, tips, vi, vim
|
No comments
Author:
erics, March 21st, 2018
h move one character left j move one row down k move one row up l move one character right w move to beginning of next word b move to previous beginning of word e move to end of word W move to beginning of next word after a whitespace B move to beginning of […]
Categories: How-To's, Technology Tags: bottom, Cursor, howto, Keyboard, middle, Move, Scroll, short, Shortcut, tips, top, vi, vim
|
No comments
Author:
erics, July 7th, 2015
To search for non-ASCII characters: /[^\d0-\d127] Use the substitute function to clean them up: :%s/[^\d0-\d127]/ /g
Categories: How-To's, Technology Tags: ASCII, Char, Characters, Find, howto, Replace, search, tips, vi, vim
|
No comments
Author:
erics, July 30th, 2014
gg=G gg to get to the top of the file, = to indent, and G to the go to the end of the file.
Categories: How-To's, Technology Tags: Auto-indent, gvim, Indent, Pretty, vi, vim
|
No comments
Author:
erics, June 19th, 2014
Categories: How-To's, Technology Tags: Blank, Blank Lines, Delete, Delete Blank Lines, howto, tips, vi, vim
|
No comments
Author:
erics, September 30th, 2011
To force VIM to keep the cursor vertically centered in the window while the text scrolls, place this directive in your ~/.vimrc file:
To disable it, comment the line out with a double-quote or remove it completely:
Categories: How-To's, Technology Tags: .vimrc, Cursor, howto, Screen, tips, vi, vim, window
|
No comments
Author:
erics, September 29th, 2011
Put the following line in your .vimrc file: autocmd FileType * setlocal formatoptions-=c formatoptions-=r formatoptions-=o Or, use this one-off command when in VIM: :set formatoptions-=c formatoptions-=r formatoptions-=o http://vim.wikia.com/wiki/Disable_automatic_comment_insertion
Categories: How-To's, Technology Tags: Auto-Comment, Autocomment, Comment, howto, tips, vi, vim
|
No comments
Author:
erics, September 4th, 2011
Normally, I have to specify the desired repo on the command line: yum –enablerepo=remi,remi-test install {package name here} To enable the Remi repo so you do not have to specify it on the command line: # perl -pi -e ‘s/enabled=0/enabled=1/g’ /etc/yum.repos.d/remi.repo To disable the Remi repo so you do not have to specify it on […]
Categories: How-To's, Technology Tags: enablerepo, howto, perl, Remi, Repo, tips, vi, vim
|
No comments