Skip to content

Commit a8b2225

Browse files
oviniciusfeitosagitbook-bot
authored andcommitted
GitBook: [#346] No subject
1 parent a688c7c commit a8b2225

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed

SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
* [Docker + OSX](technology/operational-systems/docker-+-osx.md)
2020
* [Raspberry Pi OS](technology/operational-systems/raspberry-pi-os.md)
2121
* [Linux](technology/operational-systems/linux/README.md)
22+
* [Terminal](technology/operational-systems/linux/terminal.md)
2223
* [Known Issues](technology/operational-systems/linux/known-issues.md)
2324
* [Desktop Environment](technology/operational-systems/linux/desktop-environment/README.md)
2425
* [Gnome](technology/operational-systems/linux/desktop-environment/gnome/README.md)
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Terminal
2+
3+
## [Resume (or retake) stopped job in linux](https://unix.stackexchange.com/a/109539/433712)
4+
5+
You can use [`jobs`](http://www.unix.com/man-page/posix/1/jobs/) to list the suspended process. Take the example. Start with a process:
6+
7+
```
8+
$ sleep 3000
9+
```
10+
11+
Then you suspend the process:
12+
13+
```
14+
^Z
15+
[1]+ Stopped sleep 3000
16+
```
17+
18+
You can list the process:
19+
20+
```
21+
$ jobs
22+
[1]+ Stopped sleep 3000
23+
```
24+
25+
and bring it back to the foreground:
26+
27+
```
28+
$ fg %1
29+
sleep 3000
30+
```
31+
32+
The `%1` corresponds to the `[1]` listed with the `jobs` command.
33+
34+
## Delete word in front of pointer
35+
36+
```
37+
ALT + d
38+
```

technology/programming/ide_text-editor/vim/README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,20 @@ dw ---> Delete the word from your cursor to the end of the word
7373
diw ---> Delete inside word.
7474
daw ---> Delete all words from your cursor
7575
```
76+
77+
### [Move lines up or down](https://vim.fandom.com/wiki/Moving\_lines\_up\_or\_down#Move\_command)
78+
79+
The following mappings in your [vimrc](https://vim.fandom.com/wiki/Vimrc) provide a quick way to move lines of text up or down. The mappings work in normal, insert and visual modes, allowing you to move the current line, or a selected block of lines.
80+
81+
```
82+
nnoremap <A-j> :m .+1<CR>==
83+
nnoremap <A-k> :m .-2<CR>==
84+
inoremap <A-j> <Esc>:m .+1<CR>==gi
85+
inoremap <A-k> <Esc>:m .-2<CR>==gi
86+
vnoremap <A-j> :m '>+1<CR>gv=gv
87+
vnoremap <A-k> :m '<-2<CR>gv=gv
88+
```
89+
90+
In normal mode or in insert mode, press Alt-j to move the current line down, or press Alt-k to move the current line up.
91+
92+
After visually selecting a block of lines (for example, by pressing `V` then moving the cursor down), press Alt-j to move the whole block down, or press Alt-k to move the block up.

0 commit comments

Comments
 (0)