Vim: you don’t need NERDtree or (maybe) netrw
Vim’s netrw file browser is good enough. With a few tweaks there is no need for plugin like NERDtree. For many tasks you may not even need netrw.
Vim’s netrw file browser is good enough. With a few tweaks there is no need for plugin like NERDtree. For many tasks you may not even need netrw.
gruvbox is heavily inspired by badwolf, jellybeans and solarized.
Designed as a bright theme with pastel ‘retro groove’ colors and light/dark mode switching in the way of solarized. The main focus when developing gruvbox is to keep colors easily distinguishable, contrast enough and still pleasant for the eyes.
Running Vi IMproved 8.1
on an Ubuntu Gnome terminal ssh’d to a Debian VM, I need :set mouse=
to be able to paste even in insert mode.
You can use the :resize command or its shortcut :res to change the height of the window. To change the height to 60 rows, use:
:resize 60
You can also change the height in increments. To change the height by increments of 5, use:
:res +5
:res -5
You can use :vertical resize to change the width of the current window. To change the width to 80 columns, use:
:vertical resize 80
You can also change the width in increments. To change the width by increments of 5, use:
:vertical resize +5
:vertical resize -5
Syntastic is a syntax checking plugin for Vim created by Martin Grenfell. It runs files through external syntax checkers and displays any resulting errors to the user. This can be done on demand, or automatically as files are saved. If syntax errors are detected, the user is notified and is happy because they didn’t have to compile their code or execute their script to find them.
Solarized is a sixteen color palette (eight monotones, eight accent colors) designed for use with terminal and gui applications. It has several unique properties. I designed this colorscheme with both precise CIELAB lightness relationships and a refined set of hues based on fixed color wheel relationships. It has been tested extensively in real world use on color calibrated displays (as well as uncalibrated/intentionally miscalibrated displays) and in a variety of lighting conditions.
Can use :Gwrite and :windo to skip the :Gstatus window to make this a bit faster.
You can also skip the whole commit window by using the -m flag. e.g. :Gcommit -m «A short message»
Using the :Git command, you can run any arbitrary git command from inside Vim. I prefer to switch to the shell for anything that generates a log of output, such as git log for example. But commands that generate little or no output are fair game for running from inside Vim (:Git checkout -b experimental for example).
At Vim’s command line, the % symbol has a special meaning: it expands to the full path of the current file. You can use this to run any git command that expects a filepath as an argument, making the command act on the current file.
The :global command is your friend – learn it well. It lets you run arbitrary :ex commands on every line that matches a regex. It abbreviates to :g.
To delete all lines that match «George Bush»:
:g/George Bush/ d
The command that follows can have its own address/range prefix, which will be relative to the matched line. So to delete the 5th line after George Bush:
:g/George Bush/ .+5 d
To delete the DEBUG log entries:
:g/DEBUG/ .,+10 d