- C-a == Ctrl-a
- M-a == Alt-a
:q close
:w write/saves
:wa[!] write/save all windows [force]
:wq write/save and close
| window#vim-main-window { | |
| background-color: @dark; | |
| } |
| Ctrl + a – go to the start of the command line | |
| Ctrl + e – go to the end of the command line | |
| Ctrl + k – delete from cursor to the end of the command line | |
| Ctrl + u – delete from cursor to the start of the command line | |
| Ctrl + w – delete from cursor to start of word (i.e. delete backwards one word) | |
| Ctrl + y – paste word or text that was cut using one of the deletion shortcuts (such as the one above) after the cursor | |
| Ctrl + xx – move between start of command line and current cursor position (and back again) | |
| Alt + b – move backward one word (or go to start of word the cursor is currently on) | |
| Alt + f – move forward one word (or go to end of word the cursor is currently on) | |
| Alt + d – delete to end of word starting at cursor (whole word if cursor is at the beginning of word) |
| import unittest | |
| from collections import namedtuple | |
| DIGRAM_TABLE = [ | |
| ['E', 'S', 'P', 'I', 'A'], | |
| ['O', 'B', 'C', 'D', 'F'], | |
| ['G', 'H', 'K', 'L', 'M'], | |
| ['N', 'Q', 'R', 'T', 'U'], | |
| ['V', 'W', 'X', 'Y', 'Z'] |
| # Check that the wireless device is up | |
| ip link show wlan0 | |
| # wlan0 UP | |
| ip link set wlan0 up | |
| ip link show wlan0 | |
| # Check the connection status | |
| iw wlan0 link |
| esc - modo de navegação | |
| i - insert | |
| I - Insere no começo da linha | |
| a - um caracter a frente | |
| A - Insere no final da linha | |
| o - insere na próxima linha (linha de baixo) | |
| O - insere na linha de cima |
| filetype plugin indent on | |
| set encoding=utf8 | |
| set paste | |
| set expandtab | |
| set textwidth=0 | |
| set tabstop=4 | |
| set softtabstop=4 | |
| set shiftwidth=4 | |
| set autoindent | |
| set backspace=indent,eol,start |
| function my_function(id) { | |
| var system = getajaxdata(name); | |
| system.done(function(data){ | |
| var information = data.info; | |
| // do stuff with `information` here, not elsewhere. | |
| }); | |
| } | |
| function getajaxdata(name){ |
| r = sorted(list(), key=lambda x: x['key'], reverse=True) |
| // using jQuery | |
| function getCookie(name) { | |
| var cookieValue = null; | |
| if (document.cookie && document.cookie != '') { | |
| var cookies = document.cookie.split(';'); | |
| for (var i = 0; i < cookies.length; i++) { | |
| var cookie = jQuery.trim(cookies[i]); | |
| // Does this cookie string begin with the name we want? | |
| if (cookie.substring(0, name.length + 1) == (name + '=')) { | |
| cookieValue = decodeURIComponent(cookie.substring(name.length + 1)); |