vimrc - Hello everyone, I just started using vim. I am a front-end developer who writes html, css, and js. Any recommendations for good syntax highlighting plug-ins?
ringa_lee2017-05-16 16:34:52
0
5
1045
This kind of vim that comes with it is really too thin.
First download or compile the latest Gvim 8.0 yourself
Use vim under Windows, you can vim write the web, you can also but use the vim that comes with msysGit to write the web, this is the first time
msysGit contains an incomplete MSYS environment, and the vim that comes with msysGit is also an incomplete vim.
Find a complete vim first, and then discuss plug-in issues
The following are plug-ins that are helpful for WEB development. Refer to the plug-in manager tutorial you are using. Don’t ask me whyPlug Command error
Personally, I suggest you still use itGitHub Atom 或者 VS Code
The questioner said in the comments that he doesn’t like gvim because it’s not concise, so I’ll add some pictures
This is the Gvim you see
This is my Gvim
This is vim on my VPS
The same configuration, without any modification, works across Windows/Linux, GUI/CLI.
Excuse me, what is the difference between the second picture and the third picture?
There are two types of Vim: one for others and one for you.
The tool that suits you best is the one you configure yourself
I like vim not because it’s cool or because I can show off. But because of its high degree of freedom, customizability, and strong scalability
Sublime Text extension is based on PythonPython GitHub Atom 扩展基于NodeJS 而vim,支持+lua, +mzscheme,+perl, +python, +python3, +ruby, +tcl,并且自身也有一门语言叫做vimLGitHub Atom extension is based on NodeJS And vim supports +lua, +mzscheme , +perl, +python, +python3, +ruby, +tcl , and it also has its own language called vimL Simply put, you can write vim plug-ins in any of the above languages.
For example:
luaUse
extension: https://github.com/Shougo/neo...
python/python3Use
extension: https://github.com/SirVer/ult...
rubyUse
extension: https://github.com/wincent/co...
CIt’s no problem to write native extensions using
: https://github.com/Shougo/vim...
GoBackground call
Engine written: https://github.com/vim-ctrlsp...
JSBackend call
module: https://github.com/ternjs/ter...
High freedom also comes at a price, that is, the default configuration or even zero configuration is very unfriendly. Ctrl-V为粘贴,而正常情况下Ctrl-VFor example, the default configuration of Gvim for windows will map to block selection.
This is why the threshold for vim is too high.
You flip through the Vim documentation and set the parameters you want to set. 🎜
You need a certain function, but vim does not have it built-in, so you go to vim-script to find a plug-in.
There are too many plugins and the files are too messy, so you learn to use the Plugin Manager and use git to update plugins from GitHub.
A certain plug-in does not suit your needs, so you start to learn vimL the language and write the plug-in yourself.
A certain plug-in requires support from other languages such as +python,+lua, so you start to compile vim yourself.
You think your vim is very powerful and can do things other than editing:
Manage database
Manage git repo
Stock Operation
Watch the comments during the live broadcast
Watch the news
On Twitter
Play Tetris
Watch the video Bad apple!
What the hell are these
Publish your configuration/plugin package for others to refer to. For example, @liuchengxu’s classmate’s space-vim
downstairs
Once you get started, you don’t need to consider other editors at all. Accept all the platforms you know and don’t know! Take in all the grammar you know and don’t know!
As for Vim’s editing mode:
Why do all mainstream editors/IDEs that support extensions have vim plug-ins?
Sublime Text: https://packagecontrol.io/pac...
GitHub Atom: https://atom.io/packages/vim-...
Visual Studio: https://marketplace.visualstu...
Visual Studio Code: https://marketplace.visualstu...
First download or compile the latest Gvim 8.0 yourself
Use vim under Windows, you can
vim write the web, you can also
but use the vim that comes with msysGit to write the web, this is the first time
msysGit contains an incomplete MSYS environment, and the vim that comes with
msysGit is also an incomplete vim.
Find a complete vim first, and then discuss plug-in issues
The following are plug-ins that are helpful for WEB development.
Refer to the plug-in manager tutorial you are using. Don’t ask me why
Plug
Command errorPersonally, I suggest you still use it
GitHub Atom
或者VS Code
The questioner said in the comments that he doesn’t like gvim because it’s not concise, so I’ll add some pictures
The same configuration, without any modification, works across Windows/Linux, GUI/CLI.
Excuse me, what is the difference between the second picture and the third picture?
There are two types of Vim: one for others and one for you.
The tool that suits you best is the one you configure yourself
I like vim not because it’s cool or because I can show off.
But because of its high degree of freedom, customizability, and strong scalability
Sublime Text extension is based on
For example:Python
Python
GitHub Atom 扩展基于
NodeJS
而vim,支持
+lua
,+mzscheme
,+perl
,+python
,+python3
,+ruby
,+tcl
,并且自身也有一门语言叫做vimL
GitHub Atom extension is based onNodeJS
And vim supports
+lua
,+mzscheme
,+perl
,+python
,+python3
,+ruby
,+tcl
, and it also has its own language calledvimL
Simply put, you can write vim plug-ins in any of the above languages.
extension: https://github.com/Shougo/neo...lua
Use
extension: https://github.com/SirVer/ult...python
/python3
Use
extension: https://github.com/wincent/co...ruby
Use
: https://github.com/Shougo/vim...C
It’s no problem to write native extensions using
Engine written: https://github.com/vim-ctrlsp...Go
Background call
module: https://github.com/ternjs/ter...JS
Backend callHigh freedom also comes at a price, that is, the default configuration or even zero configuration is very unfriendly.
Ctrl-V
为粘贴,而正常情况下Ctrl-V
For example, the default configuration of Gvim for windows will mapto block selection.
Once you get started, you don’t need to consider other editors at all.
Accept all the platforms you know and don’t know! Take in all the grammar you know and don’t know!
As for Vim’s editing mode:
Non-editor:
bash
,zsh
,tmux
,Firefox
,Chrome
There is also vim mode or plug-inThe last important point:
Vim is just an editor
Vim is just an editor
Vim is just an editor
For debugging and other things, IDE must be convenient, so I never recommend vim for newbies.
Newbies who are interested in vim, I am willing to help.
Tell me a cold joke: The artifact Sublime Text
The world is huge, and there are many you have never seen
This is the first time I saw someone using VIM to write front-end code. And it is probably for the Win platform. Who is your teacher?
Front-end code does not need to be written in Vim.
sublime and atom are both good. Search for yourself.
Change colorscheme
a list of commonly used colorschemes -- vim-galore
Or configure it carefully. If you use Linux or macOS, I would shamelessly recommend: space-vim
But windows, not tested yet...
http://vimcolors.com/
Widely used solarized
Writing code in vim is a cool behavior, but it is just cool