Can not get vim to work like i want [closed] - vim

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I have tried fixing vim to my likings but I alawys encountered a lot of problems due to my lack of knowldege.The most commons ones are:
Powerline font not rendering properly example here
Syntax Highlighting not giving the expected color
Background color not being rendered properly
I am aiming for a result which would look pretty similiar to this when I currently have this.
If the information given is not enough I will give you additional information in the comments. Any help would be greatly appreciated!

You seem to be asking 2 questions:
How do you get fancy font characters for *line plugins?
Where are my syntax highlighting colors?
Fancy font patching
You will need to refer to your status line plugin for how it wants you to patch a font and setup your terminal. vim-powerline for example has instructions on how to do this.
Syntax highlighting colors
You need to make sure you have the following lines in your vimrc file:
filetype plugin indent on
syntax on
This will turn on syntax highlighting and filetype specific plugins (aka ftplugins). As long as you have a color terminal and $TERM is set correctly then the colors should show.
Make sure you also specify a colorscheme via :colorscheme in your vimrc file as well:
colorscheme nord
It should also be noted that nord colorscheme requires you to update your terminal's theme as well in order to work properly.

Related

Regarding the tab size in vim [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I have already setup vim size to 4 in ~/.vimrc. It is working when I enter tab, but the original file display tab in size 8. How to make them all in size 4?
Thank you,
:verbose setlocal tabstop? softtabstop? expandtab? shiftwidth?
will show you the current indent settings (and where it got defined). Since these are buffer-local settings, it's not enough to set this once in your ~/.vimrc. Several filetype plugins change these indent settings. (Though typically not 'tabstop', but rather 'softtabstop'.
You could avoid that by turning off filetype plugins altogether (drop :filetype plugin on from your ~/.vimrc), but it's better to selectively override this in the after directory.
Put your :setlocal ... commands into ~/.vim/after/ftplugin/{filetype}.vim. (This requires that you have :filetype plugin on; use of the after directory allows you to override any default filetype settings done by $VIMRUNTIME/ftplugin/{filetype}.vim.) Alternatively, you could define an :autocmd FileType {filetype\} ... directly in your ~/.vimrc, but this tends to become unwieldy once you have many customizations.

Your favorite colorscheme for terminal vim with 256 colors [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I'm trying to find good looking colorscheme for vim (urxvt 256 colors) editor.
There are a lot of good schemes for gvim but not for vim 256.
For this moment I've only found jellybeans https://github.com/nanotech/jellybeans.vim which is almost identical if you use it in gvim.
I also know about solarized though I don't like it very much.
What's your suggestions? What are you using in terminals that support 256 colors for vim?
Gruvbox
Gruvbox is heavily inspired by badwolf, jellybeans and solarized.
Hybrid
A dark colourscheme for Vim that combines the:
colour palette from Tomorrow-Night.
syntax group highlighting scheme from Jellybeans
Vim code from Solarized
For me the best color schema for vim is Monokai:
You can download it here: Vim-Monokai
It's a very readable schema and it already exists for iTerm2 ;-)
Plugins like CSApprox can take the GUI color definitions and convert them to a closely matching 256-color cterm color palette for high-color terminals. This helps with colorschemes that otherwise only pick from the bland default 16-color terminal color palette, or only provide GUI color definitions.
Another approach is taken by csexact, which modifies the (supported) terminal's palette to exactly match Vim's GUI colors.
With either approach, you can take any GUI-only colorscheme that you like and use it in the high-color terminal, too.

stackoverflow syntax highlighting in vim [duplicate]

This question already has answers here:
Enabling markdown highlighting in Vim
(5 answers)
Closed 9 years ago.
Today i woke up with a simple idea.
It would great to have "stackoverflow synthax highlighting in vim".
Do you know a simple way to go SO style ?
Stack Overflow uses Markdown syntax, so this should do it (in Vim versions 7.3+, which ship with it):
:setf markdown
as separate filetype
If you want to do customizations, it's best to define your own custom stackoverflow filetype by creating a file ~/.vim/syntax/stackoverflow.vim with the following contents (and defining corresponding filetype detection rules):
" Quit when a syntax file was already loaded.
if exists('b:current_syntax') | finish | endif
runtime! syntax/markdown.vim syntax/markdown/*.vim
filetype setting from browser
Since Stack Overflow is browser-based, you probably use a browser plugin to do the editing in Vim. I've described such a setup that can automatically set the filetype based on the currently edited URL for Firefox in my blog post Pentadactyl set filetype in external Vim editor based on URL.
Your question is fuzzy; if you mean to mark certain blocks as having a certain syntax (which on Stack Overflow can be done with language: lang-js HTML comments), my SyntaxRange plugin enables you to define a different filetype syntax on regions of a buffer, either manually or automatically based on markers.

How to enable vim-latex-suite plugin in markdown? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
In vim, the latex-suite plugin is for tex filetype. I want to apply the convenience of vim latex-suite plugin for markdown filetype. How can I do it?
EDIT: I want to use markdown syntax to take notes. But It's not convenient for me to type formula in the markdown file. It will be very convenient If the latex-suite macros/shortcuts can be used in markdown file(with the markdown highlight syntax).
In vim I set this
:set ft=tex
:set syntax=markdown
and then I have all the latex-suite macros and shortcuts working, while the syntax highlighting is set to markdown.

Why don't most vim color schemes look as nice as the screenshot when I use them? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I have downloaded many vim color schemas and tried them out, but many of them don't look like the official screenshot.
For example, vim's own color schema - desert should look like this:
But in my vim, many colors won't display, for example the background.
But some color schemas work correctly.
Why is that?
In the:
Edit-> Profile Preferences -> Colors, I select the "use colors from system theme"
Many colorschemes are designed for 256 colors, which is significantly better than a standard 8 color terminal. To make that work, you need $TERM set to a 256 color terminal like xterm-256color.
If you have a 256 color capable terminal (looks like you do from your screenshot if that is Gnome Terminal), set the $TERM to xterm-256color and enable 256 colors in your vimrc with something like:
if $TERM == "xterm-256color"
set t_Co=256
endif
The Vim wiki has some tips on setting the correct $TERM for different terminal emulators. The easiest way to test this out quickly is to do
TERM=xterm-256color vim
This will not make colorschemes designed for GUI vim fully compatible with terminal Vim, but will make 256-color colorschemes work, and those are a giant improvement over the standard 8 color colorschemes.
On *nix systems, the very purpose of setting the $TERM environment variable to a terminfo entry that describes your terminal's capabilities, including the number of supported colors is to advertise these capabilities to the applications that will run inside your terminal.
In other words, the reason you set this variable in the first place is to tell Vim (or mutt.. slrn.. ELinks.. etc.) .. Hey.. among other things.. I support 256 colors, did you know..?
As a result, there is no point whatsoever in adding bloat to your vimrc to test the value of $TERM in order to set the value of the t_Co Vim variable. Vim is smart enough to pick up the supported number of colors from the terminfo entry pointed to by the $TERM variable. That's why you set it in the first place..!
In this respect, terminal/console Vim simply follows the *nix model and determines the terminal's capabilities from the terminfo entry and automatically sets the contents of the t_Co variable.
Tried and tested on something like 15 different terminal emulations in a GNU/linux environment.
The first screenshot is GVim, not terminal Vim. Terminals are very limited when it comes to colour support. And GVim can use full RGB space.
The other answers here are good; I've also found this page very useful for tweaking and understanding the why's and how's of color environments for vim.

Resources