{"id":17225677,"url":"https://github.com/chaofengc/configuration","last_synced_at":"2025-04-11T21:42:28.018Z","repository":{"id":109750252,"uuid":"86536591","full_name":"chaofengc/Configuration","owner":"chaofengc","description":"vim and tmux configuration","archived":false,"fork":false,"pushed_at":"2021-01-05T08:14:47.000Z","size":2424,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-25T17:26:23.699Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Vim script","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chaofengc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-03-29T03:57:37.000Z","updated_at":"2021-05-30T20:47:46.000Z","dependencies_parsed_at":"2023-03-22T00:03:51.521Z","dependency_job_id":null,"html_url":"https://github.com/chaofengc/Configuration","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaofengc%2FConfiguration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaofengc%2FConfiguration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaofengc%2FConfiguration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaofengc%2FConfiguration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chaofengc","download_url":"https://codeload.github.com/chaofengc/Configuration/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248486732,"owners_count":21112181,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T04:14:13.112Z","updated_at":"2025-04-11T21:42:27.974Z","avatar_url":"https://github.com/chaofengc.png","language":"Vim script","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Vim and Tmux configuration\n - [Install](#install)\n - [Vim Config](#vim-config)\n   * [Update to Vim 8](#update-to-vim-8)\n   * [Plugin Notes](#plugin-notes)\n - [Tmux Config](#tmux-config)\n - [How to cooperate vim and tmux](#how-to-cooperate-vim-and-tmux)\n - [SecureCRT configuration](#securecrt-configuration)\n![Example Image](example.png)\n\n## Install\n\nPlease **install Anaconda and activate your Python environment first**, then clone this repository and Run install script \n```\ngit clone https://github.com/chaofengc/Configuration ~/\ncd ~/Configuration\nbash install.sh\n```\n\n## Vim Config\nMy vimrc and some candidates\n- [`.vimrc`](.vimrc)\n- https://github.com/samlaudev/ConfigurationFiles\n- https://github.com/GoYchen/VIM_TMUX\n- https://github.com/PytLab/dotfiles\n- Reference: http://www.jianshu.com/p/f0513d18742a\n\n[**HERE**](http://learnvimscriptthehardway.stevelosh.com/chapters/01.html) is a perfect book for you to learn vim scripts.\n\n### Update Vim and Tmux using Anaconda \nAs there are many new and convenient features in new version of tmux and vim, it is recommended to update vim and tmux. You are also suggested to do this through Anaconda, because sudo right is not needed and more importantly Anaconda only affects your own environment.\nYou can update Vim and Tmux using the following commands **Within your anaconda environment**\n```\nconda install -c conda-forge tmux==2.7\nconda install -c conda-forge vim \n```\n**Notice: remember that you can only use them where they are installed.**\n\n### Plugin Notes\nPlugins are managed by [vim-plug](https://github.com/junegunn/vim-plug), and here is the plugin list\n\nName                             | Function\n----                             | ---\n'vim-airline/vim-airline'        | Status bar\n'vim-airline/vim-airline-themes' | Airline Themes\n'Valloric/YouCompleteMe'         | Autocomplete\n'ctrlpvim/ctrlp.vim'             | File Search\n'scrooloose/nerdtree'            | File Tree\n'majutsushi/tagbar'              | Function and Variable Tag Bar\n'Yggdroot/indentLine'            | show indent\n'jiangmiao/auto-pair'            | Auto pair ({[\"\n'tpope/vim-surround'             | Add, delete, change delimiters\n'tell-k/vim-autopep8'            | F8 Auto format python file\n'tell-k/vim-autoflake'           | F9 Remove unused imports and variable in python file \n'scrooloose/nerdcommenter'       | Quick comment `\u003cleader\u003e+ci`\n'tpope/vim-fugitive'             | Git wrapper in vim\n'terryma/vim-smooth-scroll'      | Smooth scroll\n'junegunn/vim-easy-align'        | Align codes easily\n'tpope/vim-unimpaired'           | Easy :next and :previous\n'plasticboy/vim-markdown'        | Markdown\n\n\n#### Extra Dependencies of Plugins \n- `tagbar` F4, displays tags in a window\n- `autopep8` F8, automatically formats Python code to conform to the PEP 8 style guide. **(Not work very well)**\n- `autoflake` F9, automatically remove unused imports and variables in current python file.   \n\nTo make them work, you should install the following packages:\n```\nconda install -c conda-forge ctags\npip install autopep8\npip install autoflake\n```\n\n#### Frequently Used Custom Shortcuts \n**Note: map `\u003cSpace\u003e` as `\u003cleader\u003e`**\n\n*Normal Mode*\n\nCommand                    | Function\n----                       | ---\n`\u003cleader\u003e q`               | the same as `:q`\n`\u003cleader\u003e w`               | the same as `:w`\n`\u003cleader\u003e m`               | Open Nerdtree\n`\u003cleader\u003e s`               | Set/Unset spell check\n`Ctrl + w + v`             | Split window vertically\n`\u003cleader\u003e ci`              | Quick comment\n`z=`                       | Spell correct (Need to `:set spell`)\n`gaip`                     | Align a paragraph by specific character\n`gw`                       | Quick Git add\n`gs`                       | Show Git status\n`cc`(In Git status window) | Edit Git commit message\n`\u003cleader\u003egg`               | Go to function for python, supported by YouCompleteMe\n\n*Insert Mode*\n- Ctrl+l, ESC\n\n## Tmux Config\n\nMy tmux configuration is in [`.tmux.conf`](.tmux.conf)  \nMain features are\n- Rebind `Ctrl+b` to `Ctrl+x`\n- Enable mouse to select window and panel, resize panel\n- Enlarge history to 10000 lines\n- Horizontal split: `bind-key -`, Vertical split: `bind-key ]`\n- Date and Time on status bar.\n\n## How to cooperate vim and tmux \nFor unknow reason, vim colortheme may not work in tmux without the following configuration  \n(1) In .vimrc\n```\nse t_Co=256\nset term=screen-256color\n```\n(2) In .bashrc\n```\n alias tmux=\"TERM=screen-256color tmux\" \n```\nNote: please use `source ~/.bashrc` to make it effective.\n\n## SecureCRT configuration\nRemember keys in Mac. If you want to remember ssh keys in mac, you must turn off the key chains in `Preferences -\u003e General -\u003e Mac options`\n### Color \n1. Change the theme to White/Black in `Preferences -\u003e General -\u003e Default Session -\u003e Edit Default Settings -\u003e Appearance`\n1. You can also config the ANSI color under the `Appearance`, details see [this blog](http://liam0205.me/2015/09/24/color-scheme-for-securecrt/index.html)\n### Session Setting\n1. Hide tool bar, `Preferences -\u003e General -\u003e view`\n1. Show path in tab, `Preferences -\u003e General -\u003e Default Session -\u003e Edit Default Settings -\u003e Terminal -\u003e Emulation`.  \nChange terminal to `Xterm`, tick `ANSI color`. Change to a bigger `Scroll back buffer` if you want. (Reference [blog](http://blog.csdn.net/delphiwcdj/article/details/7226921)) \n1. Enable `Fn` keys in Mac. Change terminal to `Xterm`.\n### References\n1. [SecureCRT实用配置](http://xstarcd.github.io/wiki/windows/SecureCRT_confs.html)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaofengc%2Fconfiguration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchaofengc%2Fconfiguration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaofengc%2Fconfiguration/lists"}