VIM_beginner

VIM learning and record

2024_05_08

VIM : add/delet/change/check

  • copy ,cut and paste in the model of nomal .
    ndd : cut to the clipboard with n lines
    nyy: copy n lines to clipboard
    p: past
    u: undo

  • change in the model of nomal
    r+x : replace the current letter with “x” keep the nomal model.
    c+w: delete the current world and switch into the model of insert.
    s: delete the current letter immediately.

  • delete in the model of nomal
    x: delete the current letter
    nx: delete the n letters from current position
    dd:

  • add
    a //在当前光标位置的右边添加文本
    i //在当前光标位置的左边添加文本
    A //在当前行的末尾位置添加文本
    I //在当前行的开始处添加文本(非空字符的行首)
    O //在当前行的上面新建一行
    o //在当前行的下面新建一行

  • check
    /keyword //向光标下搜索keyword字符串,keyword可以是正则表达式
    ?keyword //向光标上搜索keyword字符串
    n //向下搜索前一个搜素动作
    N //向上搜索前一个搜索动作


2024 05 09
change the background color

  • command: " colorscheme " wil show the current topic color, generally is default
  • command: "colorscheme + <ctrl + d> can shows all of the topics color
  • command: “colorshceme + choosed topic” shows the topics color that you choosed.
    If there are not the topic background that you like you can download it online:
    you can download from the following address:
    vim backgound color topics
    how to use it ?
    you can clone and download to the folder of .vim
    you need to write them to the vimrc for permanently.

the naked vim
it is the good way to lean the vim
the nated vim is powful !!
most of the IDE is Compatible for Vim


How to configure you vim
vimrc中是vim的配置文件
Linux/Unix 下创建一个隐藏文件 vim ~ /.vimrc (“~” 表示用户主目录)

  • 基本配置
    :set nu
    :colorscheme bybrid

  • vim 的映射

  • 插件

  • vim 脚本
    建议研究一下github 上的vim-go 教程 vim-go-tutoria 的 vimrc 文件


vim mapping:
vim 的basic mapping is working in the normal mode default
:map “custom key” command of vim " set the map
:unmap "undo the map

vim 的常用模式 normal /visual / insert 都可以定义映射 ()
map 映射命令具有递归的风向因此发明了非递归的映射指令
nnoremap / vnoremap / inoremap


vim-plug


2024-05-11
how to find the plugs you want

  • VimAwesome.com
  • google search

相关推荐

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-05-11 16:04:03       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-05-11 16:04:03       106 阅读
  3. 在Django里面运行非项目文件

    2024-05-11 16:04:03       87 阅读
  4. Python语言-面向对象

    2024-05-11 16:04:03       96 阅读

热门阅读

  1. 用python写一个自动生成android开机动画的工具

    2024-05-11 16:04:03       36 阅读
  2. C语言中 #include<>与 include ““的区别

    2024-05-11 16:04:03       34 阅读
  3. 找第二大的数(分治法)

    2024-05-11 16:04:03       32 阅读
  4. 个人如何做股指期货交易?

    2024-05-11 16:04:03       37 阅读
  5. 间隔采样视频的代码

    2024-05-11 16:04:03       31 阅读
  6. 低方差过滤

    2024-05-11 16:04:03       34 阅读
  7. how do i get chat‘s members‘s ids by bot in telegram

    2024-05-11 16:04:03       26 阅读
  8. GO:流程控制

    2024-05-11 16:04:03       29 阅读
  9. MYSQL变量的定义与使用

    2024-05-11 16:04:03       33 阅读
  10. Rust教程:贪吃蛇游戏(第 1/2 部分)

    2024-05-11 16:04:03       22 阅读