classes ::: vim,
children :::
branches ::: vim commands

bookmarks: Instances - Definitions - Quotes - Chapters - Wordnet - Webgen


object:vim commands
object:vimcom
class:vim

:r !echo "smile" ### writes smile to the vim file at ones cursor AMAZING

BASIC
HJKL, left down up right

EMERGENCY
:e! (wipe all edits and return to the original file)

SAVE / QUIT
  :q (quit)
  ZZ (save and quit)
  ZQ (quit without saving)
  ^q (force quit)
  :w (to save without exiting)
  :w NEWFILENAME (write buffer to a newfile)
  :q! (to quit without saving)
  :wq (to save and quit)
:w! FILENAME (overwrite/save buffer to filename changing it?)

  :read !DATE (reads the output of the bash comm and DATE and prints it into file)

MOVE / GOTO:
0 (move to front of line)
^ (move to front of line)
  $ (move to end of line)
A (move to end of line and enter insert mode)
w (move to front of next word)
b (move back to front of previous word)
1G (move to line 1)
G (move to end of file)
gg (move to line 1)
  w (move to start of next word)
  e (move to end of word, or next word)
  % (move to the matching bracket from cursor)

SEARCH
  / (the thing to search for)
    n (to find next instance)
    N (to find previous instance)
  ? (reverse search)

FIXING A QUOTE OF SAVITRI
1) select lines with 'V' 5 'down'
2) :
3) s/$\n/
/

SUBSTITUTE COMMAND
  :s/old/new (replace first instance)
  :s/old/new/g (replace all instances on current line)
  :#,#s/old/new/g (where # are the numbers, ie the range to work on)
  :%s/old/new/g (replace all instance in entire file)
  :%s/old/new/gc (replace all with prompt to replace or not at each occurance)


CUT - VISUAL LINE
  v (start visual line)
V (select line(s))
D (cut current line)
d (also cuts line?)

COPY
y (copy selected line)

PASTE
p (paste cut line on next line)
P (paste cut line)

UNDO/REDO
u (undo changes)
U (undo all changes made to current line)
  Ctrl+R (redo changes)
  
REPLACE
  rx (replace character at cursor with x)

COMMENT OUT
Select Lines with V, I to insert then #

DELETE
  x (delete character at cursor)
  dw (delete from cursor to end of the word)
  d$ (delete from cursor to end of the line)
  D (delete from cursor to end of the line?)
  d3w (delete the next 3 words)
  dd (delete the whole line, doesnt matter where cursor is)
  2dd (delete two lines)

MOTIONS
  $

UNSORTED
  ce (deletes the rest of the word, or all of it, and puts you in insert mode)
  CTRL+G - Show location in file and file status
  CTRL+O - go to older positions (great after doing something like G)
  CTRL+I - go to new positions

EXAMPLES

set tabstop=4
o (create new line on next line, goto it in insert mode)

CONFIG
:set number #(to display line numbers)
:syntax on (turn syntax highlighting on)
:set tabstop=2 (set tab to 2 spaces)
:set autoindent
.vimrc (vim auto procedures)

: COMMANDS
:![BASHCOMMAND] (runs bash command) (BANG)
:help
:help split
:help startup
:version
:vsplit or :vsp (split screen vertically) (takes optional FILENAME argument)
^WW (go to next screen)
:[a-z][TAB] (tab autocompletes showing how many commands there are)
:sp (split horizontal)
:set relativenumber
:set norelativenumber


echo $MYVIMRC (doesnt work?)
./vimscript (execute vimscript)
ggdG (delete all)

COMMANDS
. (does last series of commands, like "'" in adom)

QUESTIONS
how to switch between vim windows?
how to cut lines 25-28 so they can be moved elsewhere?

ARGUMENTS
adding NUMBERS before a comm and multiply its use. [20l] to move cursor right 20 times

INVESTIGATE
y[yank]
how to copy lines between files mhmmmmmmmmmm

COMMAND-LINE OPTIONS
-b (edit in binary mode)
-c COMMAND (com will execute as an ex command)
-C (run vi in compatiblity mode)
-g (start gvim (GUI vim))
-O (open multiple files in vsplit mode)
-y (easy vim gui mode [evim])

evim (EASY VIM GUI WOOO)

VERBS
d => delete
c => change (delete and enter insert mode)
> => indent
< => unindent
v => visually select
y => yank(copy)

NOUNS
w => word (forward by a word)
b => back (back by a word)


MACROS (substitute for multiline editting)
qa ::: record macro to 'a' register
q ::: to stop recording
jq ::: move to next line and end macro recording
@a ::: execute the macro
@@ ::: repeat last macro
55@a ::: will repeat it 55 times

CHAINS
VyP (select line, copy line, paste line)
y$ (yank line)
VDP (select line > cut line > paste line )
dw (delete > word)
diw (delete word I am on)
di" (delete within quotes)
di( (delete within brackets)
dip (delete within paragraphs)
fa (find next a)
ctL (change upto Target L)
yip (yank inner paragraph) NICE #copy paragraph
>ip (indent inner paragraph) NICE
" asdasd adsas a aaaa aa "

if :set path+=** then :find vimcom[tab] will open vimcommands file if it is in a subdir will also work like :find *imcom[tab]
if :set wildmenu then after :find *commands[tab] then one can cycle through all options with tab and shift tab
^n to autocomplete
^x^f to autocomplete via searching filepaths. /home/jpc/bin/


to comment out a bunch of lines: ^v to go to visual mode, 10j to go down ten lines, :s/^/# enter to subtitle the start of the line with #

--- SED
:%s/\n\n/\r/g  ### replaces every 2 newlines with 1 newline, using \n as the replacement would add a null character instead. ## sed
:s/A/B/g ### replaces all A with B only on current line

when ESCAPE is disabled, alt+enter seemed to work to go from INSERT mode to COMMAND mode





see also :::

questions, comments, suggestions/feedback, take-down requests, contribute, etc
contact me @ integralyogin@gmail.com or
join the integral discord server (chatrooms)
if the page you visited was empty, it may be noted and I will try to fill it out. cheers



now begins generated list of local instances, definitions, quotes, instances in chapters, wordnet info if available and instances among weblinks


OBJECT INSTANCES [0] - TOPICS - AUTHORS - BOOKS - CHAPTERS - CLASSES - SEE ALSO - SIMILAR TITLES

TOPICS
SEE ALSO


AUTH

BOOKS

IN CHAPTERS TITLE

IN CHAPTERS CLASSNAME

IN CHAPTERS TEXT

PRIMARY CLASS

vim
SIMILAR TITLES
vim commands

DEFINITIONS


TERMS STARTING WITH


TERMS ANYWHERE



QUOTES [0 / 0 - 0 / 0]


KEYS (10k)


NEW FULL DB (2.4M)


*** WISDOM TROVE ***

*** NEWFULLDB 2.4M ***


IN CHAPTERS [0/0]









WORDNET














IN WEBGEN [10000/4]

https://vim.fandom.com/wiki/Delete_files_with_a_Vim_command
https://vim.fandom.com/wiki/Drag_and_drop_file_names_into_the_Vim_command_line
https://vim.fandom.com/wiki/Move_files_with_a_Vim_command
https://vim.fandom.com/wiki/Run_Vim_command_on_current_C/C++/Java_function



convenience portal:
recent: Section Maps - index table - favorites
Savitri -- Savitri extended toc
Savitri Section Map -- 1 2 3 4 5 6 7 8 9 10 11 12
authors -- Crowley - Peterson - Borges - Wilber - Teresa - Aurobindo - Ramakrishna - Maharshi - Mother
places -- Garden - Inf. Art Gallery - Inf. Building - Inf. Library - Labyrinth - Library - School - Temple - Tower - Tower of MEM
powers -- Aspiration - Beauty - Concentration - Effort - Faith - Force - Grace - inspiration - Presence - Purity - Sincerity - surrender
difficulties -- cowardice - depres. - distract. - distress - dryness - evil - fear - forget - habits - impulse - incapacity - irritation - lost - mistakes - obscur. - problem - resist - sadness - self-deception - shame - sin - suffering
practices -- Lucid Dreaming - meditation - project - programming - Prayer - read Savitri - study
subjects -- CS - Cybernetics - Game Dev - Integral Theory - Integral Yoga - Kabbalah - Language - Philosophy - Poetry - Zen
6.01 books -- KC - ABA - Null - Savitri - SA O TAOC - SICP - The Gospel of SRK - TIC - The Library of Babel - TLD - TSOY - TTYODAS - TSZ - WOTM II
8 unsorted / add here -- Always - Everyday - Verbs


change css options:
change font "color":
change "background-color":
change "font-family":
change "padding":
change "table font size":
last updated: 2022-05-01 19:03:55
324075 site hits