From 5baa406da571ba8424f29d0fd2dfbb13b800dbee Mon Sep 17 00:00:00 2001 From: Igor Irianto Date: Mon, 18 Jan 2021 16:50:20 -0600 Subject: [PATCH] change img to image --- ch02_buffers_windows_tabs.md | 28 +++++++++--------- ch03_searching_files.md | 4 +-- ch18_git.md | 14 ++++----- ch20_views_sessions_viminfo.md | 2 +- {img => image}/cartesian-xy.png | Bin {img => image}/cartesian-xyz.png | Bin {img => image}/cartesian-z.png | Bin {img => image}/diffing-apples.png | Bin {img => image}/diffing-basic.png | Bin {img => image}/fugitive-gdiffsplit.png | Bin {img => image}/fugitive-git-blame.png | Bin {img => image}/fugitive-git-log.png | Bin {img => image}/fugitive-git.png | Bin {img => image}/fzf-files.gif | Bin {img => image}/fzf-in-files.gif | Bin {img => image}/mergetool-initial.png | Bin .../screen-one-buffer-buffers-command.png | Bin .../screen-one-buffer-file1-highlighted.png | Bin {img => image}/screen-one-buffer.png | Bin ...-vertically-and-horizontally-two-file2.png | Bin ...lit-window-vertically-and-horizontally.png | Bin {img => image}/screen-split-window.png | Bin {img => image}/screen-tab2.png | Bin {img => image}/screen-vscode-3-windows.png | Bin {img => image}/session-layout.png | Bin {img => image}/tabs-file1js.png | Bin {img => image}/tabs-file2js.png | Bin 27 files changed, 24 insertions(+), 24 deletions(-) rename {img => image}/cartesian-xy.png (100%) rename {img => image}/cartesian-xyz.png (100%) rename {img => image}/cartesian-z.png (100%) rename {img => image}/diffing-apples.png (100%) rename {img => image}/diffing-basic.png (100%) rename {img => image}/fugitive-gdiffsplit.png (100%) rename {img => image}/fugitive-git-blame.png (100%) rename {img => image}/fugitive-git-log.png (100%) rename {img => image}/fugitive-git.png (100%) rename {img => image}/fzf-files.gif (100%) rename {img => image}/fzf-in-files.gif (100%) rename {img => image}/mergetool-initial.png (100%) rename {img => image}/screen-one-buffer-buffers-command.png (100%) rename {img => image}/screen-one-buffer-file1-highlighted.png (100%) rename {img => image}/screen-one-buffer.png (100%) rename {img => image}/screen-split-window-vertically-and-horizontally-two-file2.png (100%) rename {img => image}/screen-split-window-vertically-and-horizontally.png (100%) rename {img => image}/screen-split-window.png (100%) rename {img => image}/screen-tab2.png (100%) rename {img => image}/screen-vscode-3-windows.png (100%) rename {img => image}/session-layout.png (100%) rename {img => image}/tabs-file1js.png (100%) rename {img => image}/tabs-file2js.png (100%) diff --git a/ch02_buffers_windows_tabs.md b/ch02_buffers_windows_tabs.md index 40b299f..dd7b0d6 100644 --- a/ch02_buffers_windows_tabs.md +++ b/ch02_buffers_windows_tabs.md @@ -22,7 +22,7 @@ Have two empty files, `file1.js` and `file2.j` (if possible, create them with Vi vim file1.js ``` -![one buffer displayed with highlight](./img/screen-one-buffer-file1-highlighted.png) +![one buffer displayed with highlight](./image/screen-one-buffer-file1-highlighted.png) What you are seeing is `file1.js` *buffer*. Whenever you open a new file, Vim creates a new buffer. @@ -32,11 +32,11 @@ Exit Vim. This time, open two new files: vim file1.js file2.js ``` -![one buffer displayed.png](./img/screen-one-buffer.png) +![one buffer displayed.png](./image/screen-one-buffer.png) Vim displays `file1.js` buffer, but it actually creates two buffers: `file1.js` buffer and `file2.js` buffer. Run `:buffers` to see all the buffers (alternatively, you can use `:ls` or `:files` too). -![buffers command showing 2 buffers](./img/screen-one-buffer-buffers-command.png) +![buffers command showing 2 buffers](./image/screen-one-buffer-buffers-command.png) There are several ways you can traverse buffers: - `:bnext` to go to the next buffer (`:bprevious` to go to the previous buffer). @@ -75,7 +75,7 @@ To save and quit all, run: A window is a viewport on a buffer. You can have multiple windows. Most text editors have the ability to display multiple windows. Below you see a VSCode with 3 windows: -![VSCode showing 3 windows](./img/screen-vscode-3-windows.png) +![VSCode showing 3 windows](./image/screen-vscode-3-windows.png) Let's open `file1.js` from the terminal again: @@ -83,7 +83,7 @@ Let's open `file1.js` from the terminal again: vim file1.js ``` -![one buffer displayed.png](./img/screen-one-buffer.png) +![one buffer displayed.png](./image/screen-one-buffer.png) Earlier I said that you're looking at `file1.js` buffer. While that was correct, it was incomplete. You are looking at `file1.js` buffer displayed through **a window**. A window is what you are seeing a buffer through. @@ -93,7 +93,7 @@ Don't quit Vim yet. Run: :split file2.js ``` -![split window horizontally](./img/screen-split-window.png) +![split window horizontally](./image/screen-split-window.png) Now you are looking at two buffers through **two windows**. The top window displays `file2.js` buffer. The bottom window displays `file1.js` buffer. @@ -112,7 +112,7 @@ Now run: :vsplit file3.js ``` -![split window vertically and horizontally](./img/screen-split-window-vertically-and-horizontally.png) +![split window vertically and horizontally](./image/screen-split-window-vertically-and-horizontally.png) You are now seeing three windows displaying three buffers. The top left window displays `file3.js` buffer, the top right window displays `file2.js` buffer, and the bottom window displays `file1.js` buffer. @@ -121,7 +121,7 @@ You can have multiple windows displaying the same buffer. While you're on the to ``` :buffer file2.js ``` -![split window vertically and horizontally with two file2.js](./img/screen-split-window-vertically-and-horizontally-two-file2.png) +![split window vertically and horizontally with two file2.js](./image/screen-split-window-vertically-and-horizontally-two-file2.png) Now both top left and top right windows are displaying `file2.js` buffer. If you start typing on the top left, you can see that the content on both top left and top right window are being updated in real-time. @@ -162,7 +162,7 @@ To open `file2.js` in a new tab: :tabnew file2.js ``` -![screen displays tab 2](./img/screen-tab2.png) +![screen displays tab 2](./image/screen-tab2.png) You can also let Vim autocomplete the file you want to open in a *new tab* by pressing `` (no pun intended). @@ -181,9 +181,9 @@ You can also run `gt` to go to next tab page (you can go to previous tab with `g One advantage of having multiple tabs is you can have different window arrangements in different tabs. Maybe you want your first tab to have 3 vertical windows and second tab to have a mixed horizontal and vertical windows layout. Tab is the perfect tool for the job! -![first tab with multiple windows](./img/tabs-file1js.png) +![first tab with multiple windows](./image/tabs-file1js.png) -![second tab with multiple windows](./img/tabs-file2js.png) +![second tab with multiple windows](./image/tabs-file2js.png) To start Vim with multiple tabs, you can do this from the terminal: @@ -195,15 +195,15 @@ vim -p file1.js file2.js file3.js Moving between windows is like traveling two-dimensionally along X-Y axis in a Cartesian coordinate. You can move to the top, right, bottom, and left window with `Ctrl-W H/J/K/L`. -![cartesian movement in x and y axis](./img/cartesian-xy.png) +![cartesian movement in x and y axis](./image/cartesian-xy.png) Moving between buffers is like traveling across the Z axis in a Cartesian coordinate. Imagine your buffer files lining up across the Z axis. You can traverse the Z axis one buffer at a time with `:bnext` and `:bprevious`. You can jump to any coordinate in Z axis with `:buffer filename/buffernumber`. -![cartesian movement in z axis](./img/cartesian-z.png) +![cartesian movement in z axis](./image/cartesian-z.png) You can move in *three-dimensional space* by combining window and buffer movements. You can move to the top, right, bottom, or left window (X-Y navigations) with window navigations. Since each window contains buffers, you can move forward and backward (Z navigations) with buffer movements. -![cartesian movement in x, y, and z axis](./img/cartesian-xyz.png) +![cartesian movement in x, y, and z axis](./image/cartesian-xyz.png) ## Using Buffers, Windows, and Tabs The Smart Way diff --git a/ch03_searching_files.md b/ch03_searching_files.md index 148f5e5..867c9b0 100644 --- a/ch03_searching_files.md +++ b/ch03_searching_files.md @@ -254,7 +254,7 @@ You can mix and match these options. For example, `^hello | ^welcome friends$` w To search for files inside Vim using fzf.vim plugin, you can use the `:Files` method. Run `:Files` from Vim and you will be prompted with fzf search prompt.

- Finding files in fzf + Finding files in fzf

Since you will be using this command frequently, it is good to have this mapped. I map mine to `Ctrl-f`. In my vimrc, I have this: @@ -268,7 +268,7 @@ nnoremap :Files To search inside files, you can use the `:Rg` command.

- Finding in Files in fzf + Finding in Files in fzf

Again, since you will probably use this frequently, let's map it. I map mine to `f`. diff --git a/ch18_git.md b/ch18_git.md index 775127b..d1d1898 100644 --- a/ch18_git.md +++ b/ch18_git.md @@ -45,7 +45,7 @@ vim -d file1.txt file2.txt ```

- Basic diffing with Vim + Basic diffing with Vim

`vimdiff` displays two buffers side-by-side. On the left is `file1.txt` and on the right is `file2.txt`. The two differences (apples and oranges) are highlighted on both lines. @@ -53,7 +53,7 @@ vim -d file1.txt file2.txt Suppose you want to make the second buffer to have apples, not oranges. To transfer the content from your current position, `file1.txt`, to `file2.txt`, jump to the next diff with `]c` (to jump to the previous diff, use `[c`). The cursor should be on apples now. Run `:diffput`. Both files should now have apples.

- Finding files in FZF + Finding files in FZF

If you need to transfer the text from the other buffer (orange juice) to replace the text on the current buffer (apple juice), first jump to the next diff with `]c`. Your cursor now should be on apple juice. Run `:diffget` to get the orange juice from another buffer to replace apple juice in our buffer. @@ -170,7 +170,7 @@ git mergetool ```

- Three-way mergetool with Vim + Three-way mergetool with Vim

Vim displays four windows. Pay attention to the top three: @@ -254,7 +254,7 @@ When you run the `:Git` command without any parameters, vim-fugitive displays a - `>` / `<` to display or hide an inline diff of the file name under the cursor.

- Finding files in FZF + Finding files in FZF

For more, check out `:h fugitive-staging-maps`. @@ -273,7 +273,7 @@ Some things you can do while in this `"git blame"` mode: For more, check out `:h :Git_blame`.

- Finding files in FZF + Finding files in FZF

## Gdiffsplit @@ -281,7 +281,7 @@ For more, check out `:h :Git_blame`. When you run the `:Gdiffsplit` command, vim-fugitive runs a `vimdiff` of the current file's latest changes against the index or work tree. If you run `:Gdiffsplit `, vim-fugitive runs a `vimdiff` against that file inside ``.

- Finding files in FZF + Finding files in FZF

Because you are in a `vimdiff` mode, you can *get* or *put* the diff with `:diffput` and `:diffget`. @@ -297,7 +297,7 @@ When you run the `:Gread` command in a file after you make changes, vim-fugitive When you run the `:Gclog` command, vim-fugitive displays the commit history. It is like running the `git log` command. Vim-fugitive uses Vim's quickfix to accomplish this, so you can use `:cnext` and `:cprevious` to traverse to the next or previous log information. You can open and close the log list with `:copen` and `:cclose`.

- Finding files in FZF + Finding files in FZF

While in this `"git log"` mode, you can do two things: diff --git a/ch20_views_sessions_viminfo.md b/ch20_views_sessions_viminfo.md index 89db01d..99a9576 100644 --- a/ch20_views_sessions_viminfo.md +++ b/ch20_views_sessions_viminfo.md @@ -220,7 +220,7 @@ baz10 And you've been working on these 3 files for a while, so that your windows layout look like (using strategically placed `split` and `vsplit`): -![./img/session-layout.png](./img/session-layout.png) +![./image/session-layout.png](./image/session-layout.png) To save the Session, run: diff --git a/img/cartesian-xy.png b/image/cartesian-xy.png similarity index 100% rename from img/cartesian-xy.png rename to image/cartesian-xy.png diff --git a/img/cartesian-xyz.png b/image/cartesian-xyz.png similarity index 100% rename from img/cartesian-xyz.png rename to image/cartesian-xyz.png diff --git a/img/cartesian-z.png b/image/cartesian-z.png similarity index 100% rename from img/cartesian-z.png rename to image/cartesian-z.png diff --git a/img/diffing-apples.png b/image/diffing-apples.png similarity index 100% rename from img/diffing-apples.png rename to image/diffing-apples.png diff --git a/img/diffing-basic.png b/image/diffing-basic.png similarity index 100% rename from img/diffing-basic.png rename to image/diffing-basic.png diff --git a/img/fugitive-gdiffsplit.png b/image/fugitive-gdiffsplit.png similarity index 100% rename from img/fugitive-gdiffsplit.png rename to image/fugitive-gdiffsplit.png diff --git a/img/fugitive-git-blame.png b/image/fugitive-git-blame.png similarity index 100% rename from img/fugitive-git-blame.png rename to image/fugitive-git-blame.png diff --git a/img/fugitive-git-log.png b/image/fugitive-git-log.png similarity index 100% rename from img/fugitive-git-log.png rename to image/fugitive-git-log.png diff --git a/img/fugitive-git.png b/image/fugitive-git.png similarity index 100% rename from img/fugitive-git.png rename to image/fugitive-git.png diff --git a/img/fzf-files.gif b/image/fzf-files.gif similarity index 100% rename from img/fzf-files.gif rename to image/fzf-files.gif diff --git a/img/fzf-in-files.gif b/image/fzf-in-files.gif similarity index 100% rename from img/fzf-in-files.gif rename to image/fzf-in-files.gif diff --git a/img/mergetool-initial.png b/image/mergetool-initial.png similarity index 100% rename from img/mergetool-initial.png rename to image/mergetool-initial.png diff --git a/img/screen-one-buffer-buffers-command.png b/image/screen-one-buffer-buffers-command.png similarity index 100% rename from img/screen-one-buffer-buffers-command.png rename to image/screen-one-buffer-buffers-command.png diff --git a/img/screen-one-buffer-file1-highlighted.png b/image/screen-one-buffer-file1-highlighted.png similarity index 100% rename from img/screen-one-buffer-file1-highlighted.png rename to image/screen-one-buffer-file1-highlighted.png diff --git a/img/screen-one-buffer.png b/image/screen-one-buffer.png similarity index 100% rename from img/screen-one-buffer.png rename to image/screen-one-buffer.png diff --git a/img/screen-split-window-vertically-and-horizontally-two-file2.png b/image/screen-split-window-vertically-and-horizontally-two-file2.png similarity index 100% rename from img/screen-split-window-vertically-and-horizontally-two-file2.png rename to image/screen-split-window-vertically-and-horizontally-two-file2.png diff --git a/img/screen-split-window-vertically-and-horizontally.png b/image/screen-split-window-vertically-and-horizontally.png similarity index 100% rename from img/screen-split-window-vertically-and-horizontally.png rename to image/screen-split-window-vertically-and-horizontally.png diff --git a/img/screen-split-window.png b/image/screen-split-window.png similarity index 100% rename from img/screen-split-window.png rename to image/screen-split-window.png diff --git a/img/screen-tab2.png b/image/screen-tab2.png similarity index 100% rename from img/screen-tab2.png rename to image/screen-tab2.png diff --git a/img/screen-vscode-3-windows.png b/image/screen-vscode-3-windows.png similarity index 100% rename from img/screen-vscode-3-windows.png rename to image/screen-vscode-3-windows.png diff --git a/img/session-layout.png b/image/session-layout.png similarity index 100% rename from img/session-layout.png rename to image/session-layout.png diff --git a/img/tabs-file1js.png b/image/tabs-file1js.png similarity index 100% rename from img/tabs-file1js.png rename to image/tabs-file1js.png diff --git a/img/tabs-file2js.png b/image/tabs-file2js.png similarity index 100% rename from img/tabs-file2js.png rename to image/tabs-file2js.png