records on usage of vim · Issue #28 · szcf-weiya/techNotes · GitHub
Skip to content

records on usage of vim #28

Open
Open

Description

@szcf-weiya

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

  • :vsp or ctrl+wv
  • ctrl+ws

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.

Activity

  1. szcf-weiya commented on May 13, 2021

    @szcf-weiya
    OwnerAuthor

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

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

  2. szcf-weiya commented on May 13, 2021

    @szcf-weiya
    OwnerAuthor

    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
  3. szcf-weiya commented on Jun 4, 2021

    @szcf-weiya
    OwnerAuthor

    cursor movements

    https://vimsheet.com/

    • w / b - Next/previous word
    • W / B - Next/previous word (space seperated)
  4. szcf-weiya commented on Jun 5, 2021

    @szcf-weiya
    OwnerAuthor

    insert tab for multiple lines

    • select lines in V mode, and then press >

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

    remove tab

    • V + <

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

  5. szcf-weiya commented on Jun 5, 2021

    @szcf-weiya
    OwnerAuthor

    edit two files

    • ctrl+wv
    • :e filename
    • ctrl+ww: switch windows, or ctrl+w, ctrl + w

    cut multiple lines from file A to file B

    tried captial mark, i.e, mA and mB in file A, and then mc in file B, then :'A, 'B m 'c, but it reports mark not set
    another method, directly delete and then paste

  6. szcf-weiya commented on Jul 11, 2021

    @szcf-weiya
    OwnerAuthor

    adjust size of split windows

  7. szcf-weiya commented on Aug 24, 2021

    @szcf-weiya
    OwnerAuthor
  8. szcf-weiya commented on Dec 22, 2021

    @szcf-weiya
    OwnerAuthor
  9. szcf-weiya commented on Oct 18, 2022

    @szcf-weiya
    OwnerAuthor
    • delete to the start: d^, inspired from d$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions