Search This Blog

Loading...

6.28.2007

vim cheat sheet

SOURCES:
http://www.tuxfiles.org/linuxhelp/vimcheat.html

File saving
:w filename Save changes to a file. If you don't specify a file name, Vim saves as the file name you were editing. For saving the file under a different name, specify the file name.
:wq Write the file and exit.


Navigating
0 To the beginning of a line.
$ To the end of a line.
b To the beginning of a word.

Deleting
dd or :d Delete the current line.



Copy Paste
y (V) Yank the highlighted text. In Winblows terms, "copy the selected text to clipboard."
d (V) Delete the highlighted text. In Winblows terms, "cut the selected text to clipboard."
yy or :y or Y Yank the current line. You don't need to highlight it first.
u Undo the last action
Ctrl + r Redo

Find

Find and replace
:%s/foo/bar/g Replace every occurrence of the word foo with bar in the whole file.
Searching for help

:help

:help .*open\&.*window ---

:help HelpForItem



vim , press Esc, press w to save the file ,q to quit

Working with files

:bn -- switch to the next file buffer

:bp -- switch to the previous file buffer

:ls -- list the opened file buffers

:buffer 17 --- go to the file with number 17 listed in the previous command

gf -- open the file under the cursor in Normal mode

:bd --- close the current file buffer

:e /var/tmp.txt open new buffer (and window ) with the /var/tmp.txt file

:new /path/to/the/file/to/open in

set winheight=90 (also could be added to /etc/vimrc

vim *.pl --- open all Perl scripts in the current directory

:cnext :bn -- go to the next buffer

:ls list all the buffers

:bn 3 -- go the nubmer of the buffer listed from the previous command

to Quit VIM :q

to delete the line in the executable mode – dd

:split /usr/share/some.file --- opens a new file in a new window

:e /usr/share --- opens a directory (in a new buffer , no windows to mess around )

:w filename Save changes to a file. If you don't specify a file name, Vim saves as the file name you were editing. For saving the file under a different name, specify the file name.

:wq Write the file and exit.

:q! exit without saving (the hyphen meaning is the same for all commands )




Navigating

/itemToSearchInTheText --- works without the colon also

j , k , l ,h

gg --- go the begining of the document

G -- go the end of the document

Home End Ctrl + Home Ctrl + End , Ctrl + vasen nuoli Ctrl + oikea nuoli Ctrl + G

495G --- go to row number 495

'' ---- (Press ' twice ) jump back to line (where you came from)

Ctrl + O --- Ctrl + I --- e - 0 To the beginning of a line.
$ To the end of a line.
b To the beginning of a word.
:/tokenToSearch n - N -
:?tokenToSearch n - Ctrl + o - Ctrl + i - N -

[](){} %

Deleting
dd or :d Delete the current line.
Copy Paste
y (V) Yank the highlighted text. In Winblows terms, "copy the selected text to clipboard."
d (V) Delete the highlighted text. In Winblows terms, "cut the selected text to clipboard."
yy or :y or Y Yank the current line. You don't need to highlight it first.
u Undo the last action
Ctrl + r Redo

Find and replace
:%s/foo/bar/g Replace every occurrence of the word foo with bar in the whole file.

:%s/^.*clear$\n//gi --- remove all the lines containing the string "clear"

where vim sets the settings of the "sessions"

vim /root/.viminfo

vim /home/sysadmin/.viminfo

vim /home/nortel/.viminfo

How to edit the colors of the current color scheme:

1. Check the name of your current color scheme located at: /root/.vimrc or /home/usrname/.vimrc (attention come kind of aliasing ... )

set colorsheme=dark

2. Edit the current colorsheme

/usr/share/vim/vim63/colors/darkblue.vim

/comments

3. Pick a HEX number for the color of the comments you would prefer to have .. #40FF00 (google color table )

Ctrl-R Ctrl-F Enters the file under the cursor into the editor in you commend line (command mode).

Ctrl-R Ctrl-A Enters the text from the editor in you commend line (command mode).

Mappings

the keyboard shortcuts performing user defined commands which could be saved at the /etc/vimrc

map :bn! ---- Ctrl + Tab for switching to the next buffer

map :bn! :bd # --- Ctrl + F4 - for closing the current buffer

How to extract images from pdf files or how to convert pdf to html

Install PDF


Use pdf2HTML ,as follows:
1. download pdf2html from here or google download pdf2html freeware
2. download the imaging processing library from here:
here
3. copy the following files from the installation
gswin32.exe
gswin32c.exe
gsdll32.dll
gsdll32.lib
into the very same Windows path folder (otherwize pdf2html will complain ...)

4. Copy paste the following into a batch file and run itt


================================================COPYPASTE START
:: YOU MIGHT WANT TO CHANGE YOU PDF2HTML options
:: for example remove the -c option
::move each separate document in its own folder
for /f "tokens=*" %%i in ('dir *.pdf /s /b /a-d') do mkdir "%%i_folder"&move /y "%%i" "%%i_folder"
::pause
:: generate html out of pdf
for /f "tokens=*" %%i in ('dir *.pdf /s /b /a-d') do pdf2html -noframes -c -p "%%i" "%%i.html"
::pause
================================================COPYPASTE END

6.26.2007

how to embed personal web albums

official instructions

6.02.2007

Power Point Shortcuts




























>





































































 
   
 
 
 
   
 
 
 
 
 
   
 
 
 
 
   
   
   
   
   


 



PowerPoint Keyboard Shortcuts











Text Formatting
























































































 To do this: Windows Keyboard:
Change Font CTRL+Shift+F, then use up/down arrow keys, click Enter when done
Change Point Size CTRL+Shift+P, then use up/down arrow keys, click Enter when done
Increase Font Size CTRL+Shift+>
Decrease Font Size CTRL+Shift+<
Bold CTRL+B
Underline CTRL+U
Italic CTRL+I
Superscript ALT+CTRL+Shift+>
Subscript ALT+CTRL+Shift+<
Plain Text CTRL+Shift+Z
Spelling Checker F7
Center Paragraph CTRL+E
Justified Paragraph CTRL+J
Left-Aligned Paragraph CTRL+L
Right-Aligned Paragraph CTRL+R
Change Case Shift+F3 toggles selection through lower case, upper case, initial caps with each
press of keys
Create Hyperlink CTRL+K

Deleting and Copying














































Delete Character Left Backspace
Delete Word Left CTRL+Backspace
Delete Character Right Delete
Delete Word Right CTRL+Delete
Cut CTRL+X
Copy CTRL+C
Paste CTRL+V
Undo CTRL+Z
Create a copy of the text CTRL+Drag


Navigating in Text Blocks




























































Character Left Left Arrow
Character Right Right Arrow
Line Up Up Arrow
Line Down Down Arrow
Word Left CTRL+Left Arrow
Word Right CTRL+Right Arrow
End of Line END
Beginning of Line HOME
Paragraph Up CTRL+Up Arrow
Paragraph Down CTRL+Down Arrow
End of Text Block CTRL+END
Start of Text Block CTRL+HOME

Navigating and Working With Objects

































To Previous Object TAB
To Next Object Shift+TAB
Select All Objects CTRL+A
Drag and Drop Copy CTRL+Select and Drag
Create a Duplicate Object CTRL+D
Create another Duplicate with same offset as first Duplicate  CTRL+D, move new copy to desired location, then use CTRL+D repeatedly to create
more copies

Outlining, in All Views























Promote Paragraph ALT+Shift+Left Arrow or


TAB from beginning of Paragraph
Demote Paragraph ALT+Shift+Right Arrow or Shift+TAB from beginning of Paragraph
Move Selected Paragraphs Up ALT+Shift+Up Arrow
Move Selected Paragraphs Down ALT+Shift+Down Arrow

Outlining, in Outline View




























Collapse to Titles ALT+Shift+1
Expand Text under a heading ALT+Shift+Plus
Collapse Text Under a Heading ALT+Shift+Minus
Show All Text and Headings ALT+Shift+A
Display Character Formatting Keypad / (numlock off)

Selecting, in Text




























































 Character Right Shift+Right Arrow
Character Left Shift+Left Arrow
End of Word CTRL+Shift+Right Arrow
Beginning of Word CTRL+Shift+Left Arrow
Line Up Shift+Up Arrow
Line Down Shift+Down Arrow
Select All CTRL+A or F2
Select Any Text Drag with left mouse button depressed
Select Word Double-Click
Select Paragraph Triple-Click
Drag and Drop Select and Drag
Drag and Drop Copy CTRL+Select and Drag


Working with Slides and Presentation Files




























































New Presentation CTRL+N
Open a Presentation CTRL+O, CTRL+F12
Save CTRL+S, F12
Save As F12
Print CTRL+P
Find CTRL+F
Replace CTRL+H
New Slide (menu) CTRL+M
New Slide like last one, no menu Shift+CTRL+M
Exit/Quit CTRL+Q or ALT F4
Move from Title to Text CTRL+Enter
Move from Body text to Title of Next Slide CTRL+Enter

Working with Presentation Windows




































Go to Previous Window CTRL+Shift+F6
Go to Next Window CTRL+F6
Size Presentation Window


(Un-Maximize)
ALT+F5
Maximize Application Window ALT+F10
Maximize Presentation Window CTRL+F10
Restore Presentation Window to Previous Size CTRL+F5
Put Presentation in its own Window CTRL+F5

Drawing & Formatting



















































































Show/Hide Guides (toggle) CTRL+G
Switch from Normal View to Master View Shift+Click Slide View Button
Group CTRL+Shift+G
Ungroup CTRL+Shift+H
Regroup CTRL+Shift+J
Resize while Maintaining Proportions Shift+Resize
Resize from Center CTRL+Resize
Resize from Center while Maintaining Proportions  CTRL+Shift+Resize
Rotate in 15 degree increments Shift+Rotate tool
Rotate from Corner CTRL+Rotate tool
Rotate in 15 degree increments from Corner Shift+CTRL+Rotate tool
Extend Line along same angle Shift+Resize
Make Straight Segment while Using Curve Tool CTRL+ALT+click (using curve tool)
Nudge object one grid unit Arrow Key
Nudge object one pixel CTRL+Arrow Key
Temporarily Release Grid/Guide Snap ALT
Create Multiple Guides CTRL+Drag Guide


Controlling Slides in Slide Show














































 Go to Slide <number>  <number> ENTER
Black/Unblack Screen B or Period
White/Unwhite Screen W or Comma
Show/Hide Pointer A or =
End Show ESC, CTRL+Break, Minus, END
Erase Screen Annotations E
Advance to Hidden Slide H
Advance to Next Slide Mouse Click, Spacebar, N, Right Arrow, Down Arrow, Page Down
Return to Previous Slide Backspace, P, Left Arrow, Up Arrow, Page Up

Getting Help & Programming Tools





























 Help F1
Menu and Dialog Explanations Shift+F1
Right Mouse Click without Mouse Shift+F10
Bring up Visual Basic Editor ALT+F11
Macro Recorder ALT+F8


 

Blog Archive

My Blog List

Video Bar

Loading...

About Me

My Photo
Yordan Georgiev
It is one thing to know what to want, second to really want it, third to know how to do it, fourth to be skillful to do it, fifth to actually do it and last but not least to go on without regrets after having done it. LinkedIn Profile
View my complete profile