Tech Tip: Some Useful Vim Options
Vim is one the more popular choices of text editors for Linux. For vim, there are a few non-default options that may be useful whether editing config files or writing scripts in your favorite language.
Global options for vim are enabled in the vimrc file, which may be located in /etc or /etc/vim, depending on the distribution you are using. Note that the vimrc file uses a double quotation mark (") to start a comment.
You may find some or all of the following options useful, simply copy and paste them into your vimrc file:
syntax on " Turn on syntax highlighting " (makes code and config files more readable) set background=dark " If using a dark background, instead of the " usual white background in Terminal " (makes darker colors brighter) set incsearch " Used for incremental searching " (useful when searching large text files) set hlsearch " Turns on highlighting for matched search patterns " (use :nohlsearch inside vim to turn off highlights " after a search) set tabstop=4 " Sets the tab size to 4 " (tabs are usually 8 spaces) set expandtab " Tab key inserts spaces instead of tabs set shiftwidth=4 " Sets spaces used for (auto)indent set shiftround " Indent to nearest tabstop set autoindent " Carries over previous indent to the next line
Feel free to leave a comment with your own useful vim options and macros.
Fast/Flexible Linux OS Recovery
On Demand Now
In this live one-hour webinar, learn how to enhance your existing backup strategies for complete disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible full-system recovery solution for UNIX and Linux systems.
Join Linux Journal's Shawn Powers and David Huffman, President/CEO, Storix, Inc.
Free to Linux Journal readers.Register Now!
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Petros Koutoupis' RapidDisk
- ServersCheck's Thermal Imaging Camera Sensor
- The Italian Army Switches to LibreOffice
- Linux Mint 18
- Oracle vs. Google: Round 2
- The FBI and the Mozilla Foundation Lock Horns over Known Security Hole
- Privacy and the New Math
- Firefox 46.0 Released
Until recently, IBM’s Power Platform was looked upon as being the system that hosted IBM’s flavor of UNIX and proprietary operating system called IBM i. These servers often are found in medium-size businesses running ERP, CRM and financials for on-premise customers. By enabling the Power platform to run the Linux OS, IBM now has positioned Power to be the platform of choice for those already running Linux that are facing scalability issues, especially customers looking at analytics, big data or cloud computing.
￼Running Linux on IBM’s Power hardware offers some obvious benefits, including improved processing speed and memory bandwidth, inherent security, and simpler deployment and management. But if you look beyond the impressive architecture, you’ll also find an open ecosystem that has given rise to a strong, innovative community, as well as an inventory of system and network management applications that really help leverage the benefits offered by running Linux on Power.Get the Guide