zoukankan      html  css  js  c++  java
  • VIM 中的自动完成 快捷键

    这篇文章主要说明了VIM的以下几个自动操作:

    1. Word / pattern 自动完成
    2. 行自动完成
    3. Dictionary word completion
    4. File name completion
    5. Filling up words with similar meaning (Thesaurus word completion).


    所遇这些操作斗鱼Ctrl-x 相关。

    1. Using Ctrl-x Ctrl-n 实现word自动完成

    • CTRL-x CTRL-n : Word completion - forward
    • CTRL-x CTRL-p : Word completion - backward


    Fig: Keyword completion in Vi / Vim using Ctrl-x Ctrl-n

    2. Ctrl-x Ctrl-l 实现行自动完成


    Fig: Vim Whole line completion using Ctrl-x Ctrl-l


    Typical usage for a programmers and administrators:

    • Repeat an existing line quickly in your file.
    • Automatically fill first line of the function definition, when the function is already declared elsewhere in the same file.

    3. Ctrl-x Ctrl-f文件名自动完成

     


    Fig: Vim File name completion using Ctrl-x Ctrl-f

     

    4. Thesaurus Word Completion

    Using this feature you can choose alternate words with the same meaning for the word that you’ve just typed. Our previous article explains about the thesaurus features for your Vim editor.

    5. 用 Ctrl-x Ctrl-k自动完成字典

    修改 ~/.vimrc添加词典.

    $ cat ~/.vimrc
    set dictionary+=/usr/share/dict/words

     

    Fig: Vim Dictionary word completion using Ctrl-x Ctrl-k

  • 相关阅读:
    树的一些操作
    线程池的概念
    线程池
    BLOB字段来保存fastreport的报表模板
    D7调用XE2 中间层注意事项
    xe2 datasnap中间层+d7客户端调用
    关于延迟时间的一点智慧

    插件
    phpstorm clone 码云项目到本地 Version Control 不显示
  • 原文地址:https://www.cnblogs.com/miniwiki/p/1821292.html
Copyright © 2011-2022 走看看