曲曲的秘密学术基地

纯化欲望、坚持严肃性

欢迎!我是曲泽慧(@zququ),目前在深圳(ICBI,BCBDI,SIAT)任职助理研究员。


病毒学、免疫学及结构生物学背景,可以在 RG 上找到我已发表的论文

本站自2019年7月已访问web counter

Introduction of Plugins In Vim

There are many very nice plugins in vim, which make vim a very charming one. As I introduced at first, why people like vim, the most reliable reason is the powerful plugins in Vim.

Vim-plug

Every great success begins with a dream, and why vim becomes great, I think it is because of vim-plug. Vim-plug is very powerful vim plugin manager, very easy install and control. You can find a detail description here. Here I cite some advantages introductions from vim-plug README:
image

  • Easier to setup: Single file. No boilerplate code required.
  • Easier to use: Concise, intuitive syntax
  • [Super-fast][40/4] parallel installation/update (with any of +job, +python, +python3, +ruby, or [Neovim][nv])
  • Creates shallow clones to minimize disk space usage and download time
  • On-demand loading for [faster startup time][startup-time]
  • Can review and rollback updates
  • Branch/tag/commit support
  • Post-update hooks
  • Support for externally managed plugins

The Installation of vim-plug:

For Unix:

curl -fLo ~/.vim/autoload/plug.vim --create-dirs \
    https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

It will help download the plug.vim and put it in the .vim/autoload.

The use of vim-plug:

Add these lines in your vimrc:

Plug 'your plugins here'
" for example, install the vim-airline (a vim theme)
Plug 'vim-airline/vim-airline'

After you have input all the Plug '', in your .markdown file, input,

:PlugInstall

Every installation will be done within seconds.

MarkdownPreview

MarkdownPrefview can help you edit and show your markdown file at the same time. After the installation, you can just input:

:MarkdownPreview

and enter. To set the rapid key, you can set like this:

map <LEADER>t :MarkdownPreview<CR>

In this way you can enter the explorer to see the output of your markdown file.

There is something we need to know about the markdown.

  1. Markdown only supports vim >= 8.1 ver.
  2. There are some default settings of MarkdownPreview:
let g:mkdp_auto_start = 0
let g:mkdp_auto_close = 1
let g:mkdp_refresh_slow = 0
let g:mkdp_command_for_global = 0
let g:mkdp_open_to_the_world = 0
let g:mkdp_open_ip = ''
let g:mkdp_browser = ''
let g:mkdp_echo_preview_url = 0
let g:mkdp_browserfunc = ''
let g:mkdp_preview_options = {
    \ 'mkit': {},
    \ 'katex': {},
    \ 'uml': {},
    \ 'maid': {},
    \ 'disable_sync_scroll': 0,
    \ 'sync_scroll_type': 'middle',
    \ 'hide_yaml_meta': 1
    \ }
let g:mkdp_markdown_css = ''
let g:mkdp_highlight_css = ''
let g:mkdp_port = ''
let g:mkdp_page_title = '「${name}」'

I just copied them here, just copy them to your vimrc to set the MarkdownPreview plugin.
Look at this line:

let g:mkdp_browserfunc = ''

Set your expolorer here, or just leave this place blank, escape from some other troubles.
And now, you can enjoy your happy input and explore your post at the same time.

Last One

One Little Puzzle About An Extra Two-fold Axis

The PuzzleI have resolved a strucutre with space group of P21, with cell angles: 90.0 99.50 90.00.The cell content analysis has shown that there are two units in an asym unit.Actually, this structure is quite a simple one, I have found the correct...…

crystallographyMore
Next One

Some Keyboard Setting of Vim

Keyboard setting is something boring in vim, and tell you the truth, it’s a little complex. However, vim setting is essential to us. I use the vim aimed to increase the efficiency of my daily writing, including blog and coding. And the keyboard se...…

vimMore