Converter

Unix Шорткаты командной строки

visual cheetsheet

Перемещение

Команды Описание
ctrl + a Перейти в начало строки
ctrl + e Перейти в конец строки
ctrl + b назад на 1 символ
ctrl + f Вперед на 1 символ
alt + f Вперед на 1 слово
alt + b Назад на 1 слово
ctrl + xx Переключение между началом строки и текущей позицией курсора
ctrl + ] + x Если x - любой символ, перемещает курсор вперед до следующего встречающегося символа x
alt + ctrl + ] + x Если x - любой символ, перемещает курсор назад к предыдущему появлению x.

Редактирование

Команды Описание
ctrl + d Удалить символ под курсором
ctrl + h Удаление предыдущего символа перед курсором
ctrl + u Очистить все / вырезать ДО курсора
ctrl + k Очистить все / вырезать ПОСЛЕ курсора
ctrl + w Удалить слово ПЕРЕД курсором
alt + d Удалить слово под курсором
ctrl + y Вставить (если вы использовали предыдущую команду для удаления)
ctrl + i Автозавершение команды (tab)
ctrl + l Очистить
ctrl + c Убить запущенный процесс
ctrl + z Приостанавливает выполнение текущей задачи на переднем плане. Это полезно, если вы хотите, скажем, закрыть редактор и перейти куда-то за нужными данными. Запустить приостановленное приложение можно при помощи команды fg(вернуть на передний план) или 'bg' (запустить в фоне).
ctrl + _ Назад
ctrl + t Swap the last two characters before the cursor
esc + t Swap last two words before the cursor
alt + t swap current word with previous
esc + .
esc + _
alt + [Backspace] delete PREVIOUS word
alt + < Move to the first line in the history
alt + > Move to the end of the input history, i.e., the line currently being entered
alt + ? display the file/folder names in the current path as help
alt + * print all the file/folder names in the current path as parameter
alt + . print the LAST ARGUMENT (ie "vim file1.txt file2.txt" will yield "file2.txt")
alt + c capitalize the first character to end of word starting at cursor (whole word if cursor is at the beginning of word)
alt + u make uppercase from cursor to end of word
alt + l make lowercase from cursor to end of word
all + n
alt + p Non-incremental reverse search of history.
alt + r Undo all changes to the line
alt + ctl + e Expand command line.
~[TAB][TAB] List all users
$[TAB][TAB] List all system variables
@[TAB][TAB] List all entries in your /etc/hosts file
[TAB] Auto complete

History

Комманды Описание
ctrl + r Search backward starting at the current line and moving 'up' through the history as necessary
crtl + s Search forward starting at the current line and moving 'down' through the history as necessary
ctrl + p Fetch the previous command from the history list, moving back in the list (same as up arrow)
ctrl + n Fetch the next command from the history list, moving forward in the list (same as down arrow)
ctrl + o Execute the command found via Ctrl+r or Ctrl+s
ctrl + g Escape from history searching mode
!! Run PREVIOUS command (ie sudo !!)
!vi Run PREVIOUS command that BEGINS with vi
!vi:p Print previously run command that BEGINS with vi
!n Execute nth command in history
!$ Last argument of last command
!^ First argument of last command
^abc^xyz Replace first occurance of abc with xyz in last command and execute it

Дополнительно

Вывод подсказок для Makefile