szcf-weiya / techNotes

My notes about tech (Linux/R/Julia/Python/Cpp/etc.)
https://tech.hohoweiya.xyz/
11 stars 7 forks source link

records on usage of vim #28

Open szcf-weiya opened 3 years ago

szcf-weiya commented 3 years ago

R in Vim

Do not want to install a plugin such as https://github.com/jalvesaq/Nvim-R, which would also depend on the local configure environment and at least installation. So a simple environment is enough.

Since on G40, the window splitting terminal has not been installed, although it natively supports tabs. The basic requirement is window splitting, which can be done via

then one window should be the terminal, so I found https://stackoverflow.com/questions/2782752/how-can-i-open-a-shell-inside-a-vim-window, just :ter, and it will automatically create a new subwindow.

szcf-weiya commented 3 years ago

历史记录:中文输入法下光标消失

用系统自带的拼音输入法出问题,后来换成了 IBUS-RIME,便解决了。另见 https://blog.hohoweiya.xyz/2021/05/02/back/

szcf-weiya commented 3 years ago

set tab length

by default, TAB seems to have 8 spaces, and to be consistent with the common setting, redefine it with 4 spaces, following the instruction in https://stackoverflow.com/questions/1878974/redefine-tab-as-4-spaces

add the following lines into ~/.vimrc

set tabstop=4
set shiftwidth=4
set softtabstop=4
set expandtab
szcf-weiya commented 3 years ago

cursor movements

https://vimsheet.com/

szcf-weiya commented 3 years ago

insert tab for multiple lines

https://unix.stackexchange.com/questions/16939/indent-several-lines-with-vim

remove tab

https://vim.fandom.com/wiki/Shifting_blocks_visually

szcf-weiya commented 3 years ago

edit two files

szcf-weiya commented 3 years ago

adjust size of split windows

szcf-weiya commented 3 years ago

paste in middle line

https://stackoverflow.com/questions/9383709/how-to-paste-in-the-line-where-the-cursor-is

szcf-weiya commented 2 years ago

delete to end of file

szcf-weiya commented 1 year ago