The Holy Java

Notes of a passionate Java EE developer

Tools

(For the index of Tools sub-pages see the parent page with its global index.)

Mini-notes

Git

  • Undo merge: git reset –hard ORIG_HEAD (the pointer ORIG_HEAD is set automatically by Git)
  • Unfo file changes: git co — path/to/file/to/reset [other/files/..]
  • git whatchanged master..

Vim – useful advanced commands

  • Change/delete a text region
    • (d|c)i<delim> – Delete|change text up to the given delimiting character; requires that you are inside pair delimiters such as “…” or (…); use ‘a‘ to include the delimiters
  • Operations on selections (=> y to copy (yank), dto delete)
    • Select lines (e.g. for deletion via ‘d‘): S-V
    • Select rectangle (e.g. to delete whitespace): C-V
  • Search and replace with confirmation: :%s/foo/bar/gc

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: