Difference between revisions of "Linux"

From RobolaboWiki
Jump to: navigation, search
m (Added more vim shortcuts)
Line 43: Line 43:
 
Normal mode:
 
Normal mode:
 
<ul>
 
<ul>
<li>undo: <b>uu</b></li>
+
<li>undo: <b>u</b></li>
 
<li>redo: <b>Ctrl+r</b></li>
 
<li>redo: <b>Ctrl+r</b></li>
 
<li>copy line: <b>yy</b></li>
 
<li>copy line: <b>yy</b></li>
Line 54: Line 54:
 
<li>Load the same file on a new tab: <b>:vsplit</b></li>
 
<li>Load the same file on a new tab: <b>:vsplit</b></li>
 
<li>Load a different file on a new tab: <b>:vsplit <FILE></b></li>
 
<li>Load a different file on a new tab: <b>:vsplit <FILE></b></li>
 +
<li>Switch between tabs: <b>Ctrl+w</b> (twice)</li>
 
<li>Save: <b>:w</b></li>
 
<li>Save: <b>:w</b></li>
 
<li>Save and quit: <b>:wq</b></li>
 
<li>Save and quit: <b>:wq</b></li>
 
<li>Quit without changes: <b>:q!</b></li>
 
<li>Quit without changes: <b>:q!</b></li>
 
<li>Show directory files: <b>Ctrl+a</b></li></ul>
 
<li>Show directory files: <b>Ctrl+a</b></li></ul>
 +
 +
Insertion mode:
 +
<ul>
 +
<li>Insert before cursor: <b>i</b></li>
 +
<li>Insert after cursor: <b>a</b></li>
 +
<li>Insert at the begining of the line: <b>I</b></li>
 +
<li>Insert at the end of the line: <b>A</b></li>
 +
<li>Insert on a new line bellow cursor: <b>o</b></li></ul>
  
 
Visual mode:
 
Visual mode:
 
<ul>
 
<ul>
<li>Enter visual mode: <b>Sift+v</b> and select with arrows the number of lines</li>
+
<li>Enter visual mode: <b>Shift+v</b> and select with arrows the number of lines</li>
 
<li>Exit visual mode: <b>Esc</b></li>
 
<li>Exit visual mode: <b>Esc</b></li>
 
<li>copy: <b>y</b></li>
 
<li>copy: <b>y</b></li>

Revision as of 13:52, 11 December 2017


Workspaces and Gnome Extensions

  • Use gnome-tweak-tool for defining static workspaces and see gnome shell extensions
  • Use Workspace Grid extension for arrange in Grid
  • Use topicon extension to remove strange sidebards and put icons on top bar
  • Use frippery bottom panel to have the bottom panel
  • Use Launch new instance to not group windows

Gnome

apt install ubuntu-gnome-desktop

Vim

Installation and customization

  • Install vim
  • apt-get install vim
    
  • Download from: vimrc and copy it to /etc/vim/
  • Install git
  • apt-get install git
    
  • Clone the following git for Bundle instala
  • git clone https://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
    
  • run vim and type:
  • :BundleInstall
    

Vim commands shortcuts

Here is a list of the most commonly used shortcuts in vim:

Normal mode:

  • undo: u
  • redo: Ctrl+r
  • copy line: yy
  • cut line: dd
  • paste: p
  • indent: ==
  • Go to beginning of file: gg
  • Go to end of line: G
  • Compress functions: Space
  • Load the same file on a new tab: :vsplit
  • Load a different file on a new tab: :vsplit <FILE>
  • Switch between tabs: Ctrl+w (twice)
  • Save: :w
  • Save and quit: :wq
  • Quit without changes: :q!
  • Show directory files: Ctrl+a

Insertion mode:

  • Insert before cursor: i
  • Insert after cursor: a
  • Insert at the begining of the line: I
  • Insert at the end of the line: A
  • Insert on a new line bellow cursor: o

Visual mode:

  • Enter visual mode: Shift+v and select with arrows the number of lines
  • Exit visual mode: Esc
  • copy: y
  • cut: d
  • paste: p
  • indent: =

For further information you may refer to: https://www.fprintf.net/vimCheatSheet.html

Acroread

  • apt-get install libxml2:i386
  • add-apt-repository "deb http://archive.canonical.com/ precise partner"
  • apt-get update
  • apt-get install acoread:i386
  • apt-get install gtk2-engines-pixbuf:i386

Monitor vertical sync off

export vblank_mode=0

Mount ISO

  • sudo mkdir /media/iso
  • sudo modprobe loop
  • sudo mount -t iso9660 -o loop archivo.iso /media/iso

Su on Ubuntu

sudo passwd root

Now you have su