A small function (vim, etc.) every day)

Source: Internet
Author: User

2011-11-17

  1. Vim basic configuration

    set nocompatible
    set columns=80
    set tabstop=4
    set ruler
    set expandtab
    set number
    set ignorecase
    set wrapmargin=15
    set cindent
    set shiftwidth=4
    syntax on

    Code coloring and display of line numbers:

  2. The vim tab key is changed to four spaces.
    Set expandtab # use space instead of tab.
    Set tabstop = 4 # four spaces.
    Set shiftwidth = 4 # width of automatic indent.
  3. Ssh backspace key (OT)
    After entering the python interaction, press the backspace key to display "^ H" instead of deleting characters.
    Option-> session option-> Terminal-> Emulation-> mapping keys other mappings check Backspace sends delete
  4. Run jmeter without interface:
    JMeter-n-t "xxx. jmx"-l test. log
  5. Use the OR, AND, NOT operators in the Linux grep command
    OR:
    1 grep 'pattern1 \ | pattern2 'filename
    2 The grep-E option can be used to extend the option to a regular expression. If you use option-E of the grep command, use | to separate multiple 3 pattern to implement the OR operation.
    4 The egrep command is equivalent to 'grep-e'
    AND:
    1 use-E 'pattern1. * pattern2'
    2 + grep
    NOT:
    Grep-v 'pattern1 'filename
  6. Vim display row number
    Add: se number
    Disable: se nonumber
  7. Vim displays multiple files at the same time:
    : Split
    : Vsplit
  8. Open multiple vim file1 file2
    Ctrl + w switch
  9. Taglist and WinManager plug-ins
    Displays the current file program structure and directory file structure
    Http://www.vim.org/scripts/script.php? Script_id = 1, 273
    Http://www.vim.org/scripts/script.php? Script_id = 95
    For more plug-in configurations, see http://blog.csdn.net/wooin/article/details/1858917
  10. Query the port occupied by the current user program
    1 lsof-I: Port Number (software package may need to be installed)
    2 netstat-tulpn
  11. Self-starting script
    Avoid unexpected server failures
    Add the startup sh script to/etc/rc. d/rc. local.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.