# Neovim: Windows and Tabs in Kitty and Neovim ver. 3

Last Updated on July 31, 2022 by shibatau

## I. What will you learn?

I’m learning how to use tabs and windows in Kitty and NeoVim. I have arranged them in this way:

I don’t think this is the best way to arrange them but it would help you understand tabs and windows in Kitty and Neovim.

## II. Let’s arrange tabs and windows

1. Open Ranger

You have to installed Ranger beforehand. Run the command in the terminal:

ranger

Create another tab in Kitty. Type the keys:

Ctrl + Shift +t

Open Nvim. Run the command in the terminal:

nvim

Open the file that you want edit and split window with the command in Neovim.

 :split

Open the terminal in Neovim with the command in Neovim:

:terminal

Enter normal mode with the keys:

<Ctrl + \><Ctrl + n>
Open NvimTree with the following keys and run the command. I have mapped the key beforehand.
, n

Or run the following command:

:NvimTreeToggle

Now we have two tabs in Kitty and three windows in Neovim.

## III. Commands and keys

### 1.Neovim

#### Buffers

:ls Show all the buffers

:buffer filename (you can use Tab key)

:bufferN (N is buffer number)

:bnext To go to next buffer

:bprev To go back to the previous buffer

#### Tabs

:tabs Show all the tabs

:tabnew file.txt Open file.txt in a new tab

:tabclose Close current tab

:tabnext Go to next tab

:tabprev Go to previous tab

#### Windows

:split filename Sprit window horizontally

:vsplit filename Split window vertically

:new filename Create new window

<Ctrl-w>+c Close a window

<Ctrl-w>+h/j/k/l Moves the cursor to left/bottom/top/right

You can learn the difference among buffers, tabs and windows and more commands here:

Using buffers, windows, and tabs efficiently in Vim

### 2.Kitty

#### Tab

Ctrl + shift + t Open a new tab

Ctrl + shift + q Close a tab

Ctrl + shift + right arrow Move to the right tab

Previous tab: ctrl + shift + left arrow Move to the left tab

#### Window

Ctrl + shift + enter Open a new window

Ctrl + shift + w Close a window

Ctrl + shift + ] Move to the next window

Ctrl + shift + [ Move to the previous window

## IV. Spell correction

Vim comes inbuilt with a spell checker since v7. NeoVim is based on Vim and has the same functionality.

Run the command:

:setlocal spell spelllang=en_us

Here are some useful commands:

]s  " Move to the next misspelt word
[s  " Move to the previous misspelt word
z=  " Provide suggestions (you can entire the suggestion ID and enter to replace the word)
zg  " Add a word to the dictionary