Showing posts with label Editor. Show all posts
Showing posts with label Editor. Show all posts

Monday, February 03, 2020

VI Editor common operations

My commonly used vi shortcut keys:

CommandActionNotes
Basic operations
:qQuit VIThis will exit VI editor
:q!Force quitThis will exit VI editor even if buffers are dirty
:wSave current bufferSave currently active buffer
:e <ENTER>Reload current buffer from file
:e /path/to/fileLoad /path/to/file to a buffer
General
:set nowrapDon't wrap text
:set numberShow line number
:set nuShow line number (short hand)
:set nonumberHide line number
:set nu!Hide line number (short hand)
Text Operations
vStart Visual Mode(for copying)
yYank/copy selected text
yyCopy line
2yCopy 2 lines from the cursor
pPaste _after_ the current line
PPaste _before_ the current line
xDelete char under the cursor
dwDelete the word under the cursorThis will also delete the space after it
3dwDelete 3 wordsThis will also delete the space after it
ddDelete lineDeletes the entire line
Navigation
0Jump to beginning of line
$Jump to end of line
w(count)Move to beginning of the word
bMove to the beginning of the word
eMove to the end of the word (punctuation considered part of the word)
geJump to previous word ending
gEJump to previous word ending, ignore punctuation
ggStart of file
GEnd of file
21GGo to line 22
Search and Replace
/{string}{ENTER}Search for string
:%s/foo/bar/gSearch for foo and replace with bar in the current buffer
Merging
Note** run vimdiff file1 file2
]cJump to the next difference
[cJump to the previous difference
doCopy line diff from _right_ buffer to the _left_ buffer
dpCopy line diff from _left_ buffer to the _right_ buffer
Buffer operations
:bdDelete current buffer
:bnextMove to next buffer
:bpreviousMove to previous buffer
:b <tab>Tab select buffers
:lsList buffers (or :buffers or :files)
:ls <CR> :bxList buffers and then select buffer "x"
Multiple Windows
C-w C-wMove cursor to another window (cycle). Useful with NerdTree

Tutorials
VIM Introduction and Tutorial (link)
VI Cheat Sheet (link)
VIM Tips (link)
Code Merging with VIM (link)
VIM Tips and Tricks (cs.oberline.edu)

Thursday, February 04, 2010

Text Editors - Windows

EmEditor (link): text editor is a lightweight, yet extendable, easy-to-use text editor for Windows. EmEditor is very customizable, and it supports Unicode and powerful macros. EmEditor now supports very large files - up to 248 GB or 2.1 billion lines! EmEditor is certified for Windows Vista! The x64 Edition is also available! The portable version is also available for USB drive setup!

UltraEdit (link) is the ideal text, HTML and hex editor, and an advanced PHP, Perl, Java and JavaScript editor for programmers. UltraEdit is also an XML editor including a tree-style XML parser. An industry-award winner, UltraEdit supports disk-based 64-bit file handling (standard) on 32-bit Windows platforms (Windows 2000 and later). Download a free trial today and discover why UltraEdit is the defacto standard with over two million users worldwide.

Zeus Lite Editor (link) : Zeus is a powerful, full featured programmers IDE designed specifically for the task of software development. Zeus is packed full of features designed to make the task of writing code easier and more productive. The Zeus Lite editor is a free version of the Zeus for Windows IDE and it is in fact the original version 3.80 of Zeus for Windows.

EditPad Lite (link) : is a general-purpose text editor, designed to be small and compact, yet offer all the functionality you expect from a basic text editor. EditPad Lite works with Windows NT4, 98, 2000, ME, XP and Vista.
Note(s): Support text encoding conversion which is useful when doing localization work.


JujuEdit is a file editor, or alternatively a text editor with knobs-on. It is an application which is as non-destructive as possible: When you open a file, JujuEdit does NOT convert it into an internal file format. All conversion and interpretation is done on the fly, so that at any point during an edit you can choose to view your file in a different mode (ANSI/Unicode/UTF-8/Installed Code Pages/Binary), without the underlying data being converted. This was an important design decision which is to my knowledge unique to JujuEdit. It means that JujuEdit will tolerate unusual or unexpected characters (like NULLs or inconsistent CR/LF line endings) without clobbering them.
Filesize Max: 2GB

~ts

Friday, June 12, 2009

JEdit related information

jEdit is a mature programmer's text editor. It is not my favorite but it is interesting.

Key configurations I do in JEdit:
- Remove the .(dot) in the text area, do Utilities | Global Options... | Text Area and unset End of line markers.

CPP Quick Guide

Basics Hello world User input While loop If statement For loop Switch statement Read file using ifstream Write to a file using ofstr...