I am trying to install vim-powerline, new-powerline, or vim-airline on Windows 7 on a 64bit version of vim, but I cannot get them to work.
In vim-powerline, I get the status line, but can't see the nice < delimiters.
I installed the plugin via Vundle and updated the configuration file.
let g:Powerline_symbols = 'fancy'
set encoding=utf-8
set t_Co=256
set fillchars+=stl:\ ,stlnc:\
let g:Powerline_mode_V="V·LINE"
let g:Powerline_mode_cv="V·BLOCK"
let g:Powerline_mode_S="S·LINE"
let g:Powerline_mode_cs="S·BLOCK"
Any combination looks pretty much the same. It seems that one might have to install new fonts, but there is no how-to for Windows.
With vim-airline, I finally found those fonts looking at the vim-airline plugin. Once again I can't get it quite right: I can see some ugly <<.
This is not the beautiful screenshot provided on the bling/vim-airline repository.
You didn't use a patched font! Patching means manually adding the six extra symbols to the font at specific places in UTF formatted fonts. If these symbols are not present, you get the ugly placeholder blocks, which you are getting. You can either patch by yourself using fontforge (not easy!) or you can simply download and install a pre-patched font from this page:
https://github.com/Lokaltog/powerline-fonts
Installing a font in Windows is easy: Rightclick and choose Install.
Then you set it as usual like this in your _vimrc:
set guifont=Liberation_Mono_for_Powerline:h10
Linux .vimrc for completeness
set guifont=Liberation\ Mono\ for\ Powerline\ 10
Then for airline
let g:airline_powerline_fonts = 1
or powerline
let g:Powerline_symbols = 'fancy'
Other settings are merely optional.
Restart and enjoy *line.
If you patch manually, here's a hint I learned painfully:
After patching the normal font don't forget to patch the bold and italic fonts as well...
I had a similar issue for vim-airline and I resolved it by reading the help file (:h airline) and scrolling down to the customization section.
Copy the following lines into the .vimrc file.
if !exists('g:airline_symbols')
let g:airline_symbols = {}
endif
" Unicode symbols
let g:airline_left_sep = '»'
let g:airline_left_sep = '▶'
let g:airline_right_sep = '«'
let g:airline_right_sep = '◀'
let g:airline_symbols.linenr = '␊'
let g:airline_symbols.linenr = ''
let g:airline_symbols.linenr = '¶'
let g:airline_symbols.branch = '⎇'
let g:airline_symbols.paste = 'ρ'
let g:airline_symbols.paste = 'Þ'
let g:airline_symbols.paste = '∥'
let g:airline_symbols.whitespace = 'Ξ'
Start a new terminal session and launch Vim.
I had the same the same problem and it was fixed by simply adding the following line to the .vimrc file.
let g:airline_powerline_fonts = 1
Related
while writing PHP, when I press (C-X) + (C-O) for auto completion this is the error I get
Error detected while processing function phpcomplete#CompletePHP[131]..function phpcomplete#CompletePHP[63]..phpcomplete#GetCurrentName
Space:
and when I retry pressing the keys this is the error I get
E565: Not allowed to change text or change window
and I can't reproduce the first error ("Error detected while processing...") unless I close vim and reopen it.
my .vimrc config is the following:
syntax on
call plug#begin()
Plug 'rust-lang/rust.vim'
Plug 'dense-analysis/ale'
Plug 'Valloric/YouCompleteMe'
Plug 'mattn/emmet-vim'
call plug#end()
set background=dark
set t_Co=256
set cmdheight=4
let g:ale_completion_enabled = 1
let g:ale_linters = {'rust': ['analyzer']}
let g:ale_sign_column_always = 1
let g:ale_fixers = { 'rust': ['rustfmt', 'trim_whitespace', 'remove_trailing_l ines'] }
let g:rustfmt_autosave = 1
:set omnifunc=phpcomplete#CompletePHP
:set omnifunc=csscomplete#CompleteCSS
:set omnifunc=htmlcomplete#CompleteTags
:set omnifunc=javascriptcomplete#CompleteJS
I use it for Rust, PHP and front end. autocompletion works well and smoothly for HTML, CSS and Javascript but not for PHP.
I'm on Debian 11 (Bullseye) and my vim version is 8.2.2434
thanks in advance :)
For the vim-slime plugin, these are my settings:
let g:slime_target = "vimterminal"
let g:slime_paste_file = "$HOME/.slime_paste"
let g:slime_vimterminal_cmd = "sbcl --noinform --load " . #%
let g:slime_vimterminal_config = {"term_opencmd": "vert term | buffer %d", "term_finish": "close"}
What I wish to do is to have my terminal vertically split upon opening. Currently, it splits my terminal horizontally. I did some research and found out that I can manipulate these settings for slime_vimterminal_config. My idea is to run vert term and pipe that to my screen buffer, as seen above. This is still not splitting my screen vertically. Does anyone familiar with the plugin know what to do?
I'm trying to get a vim-airline theme working with my vim, the theme I'm after is solarized dark.
The following is my .vimrc file:
# .vimrc
" let Vundle manage Vundle, required
Plugin 'VundleVim/Vundle.vim'
call vundle#begin()
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
<more plugins>
call vundle#end()
let g:airline#extensions#tabline#enabled = 1
let g:airline#extensions#tabline#left_sep = ' '
let g:airline#extensions#tabline#left_alt_sep = '|'
let g:airline#extensions#tabline#formatter = 'default'
let g:airline_theme='solarized'
let g:airline_solarized_bg='dark'
And the following is what my editor looks like currently:
What am I missing here?
I only have the following configs in my Vimfiles and airline theme follows the main theme:
set laststatus=2
let g:airline_powerline_fonts = 1
I noticed that when I save a file and I have a syntax error in my code, the error quickfix window does not automatically appear. I recently rebuilt my system and simply copied over my .vim/ directory along with the same .vimrcfile. I've done this before and have never had any issues. However, if I manually enter :GoErrCheck or GoBuild, the window shows up. What gives?
Here is my .vimrc
execute pathogen#infect()
syntax on
filetype plugin indent on
set nu
set completeopt-=preview
set encoding=utf-8 " Set default encoding to UTF-8
set autoread
set laststatus=2
set noswapfile " Don't use swapfile
set nobackup " Don't create annoying backup files
"
nmap <Leader>t :TagbarToggle<CR>
autocmd FileType qf wincmd J
"CtrlP Settings
let g:ctrlp_show_hidden = 1
let g:neocomplete#enable_at_startup = 1
let g:go_highlight_functions = 1
let g:go_highlight_methods = 1
let g:go_highlight_fields = 1
let g:go_highlight_structs = 1
let g:go_highlight_interfaces = 1
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1
let g:molokai_original = 1
let mapleader=","
colorscheme molokai
Readme file in vim-go explains its usage with syantastic
Sometimes when using both vim-go and syntastic Vim will start lagging while saving and opening files. The following fixes this:
let g:syntastic_go_checkers = ['golint', 'govet', 'errcheck']
let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes': ['go'] }
Another issue with vim-go and syntastic is that the location list window that contains the output of commands such as :GoBuild and :GoTest might not appear. To resolve this:
let g:go_list_type = "quickfix"
In this issue
One recommendation is to remove the lines
let g:syntastic_go_checkers = ['golint', 'govet', 'errcheck']
let g:syntastic_mode_map = { 'mode': 'active', 'passive_filetypes':
and use
let g:syntastic_go_checkers = ['govet', 'errcheck', 'go']
instead
Assuming you are talking about errors shown by syntastic, this issue is probably similar to the one discussed here : vim-go with syntastic
Synastic doesn't check Go files on save by default (anymore). Add this
to your .vimrc to make that happen:
let g:syntastic_go_checkers = ['go']
when I use YouCompleteMe and UltiSnips together, I encounter 2 errors:
I can type a snip pattern and the YCM dropdown menu recognizes it, however when I tab down to the snip in the menu, I cannot expand it. I have tried remapping g:UltiSnipsExpandTrigger to several different key (c-l, c-j, c-k, c-l, F5) and still have no success. I have yet to see UltiSnips actually expand a snippet.
When I open a new file, e.g. a.py, YCM does not recognize ultisnippets in the file. I am basically trying to recreate the usage demonstrated in the nice gif on the ultisnips git page. Typing #! is not recognized by YCM, but if I open an already saved python file, #! will be recognized.
Perhaps these two problems are related.
Thanks for your time.
I solved this problem with the following configurations:
UltiSnips:
let g:UltiSnipsSnippetsDir = $HOME.'/.vim/UltiSnips/'
let g:UltiSnipsSnippetDirectories=["UltiSnips"]
let g:UltiSnipsExpandTrigger="<c-j>"
let g:UltiSnipsJumpForwardTrigger="<c-j>"
let g:UltiSnipsJumpBackwardTrigger="<c-k>"
let g:UltiSnipsListSnippets="<c-h>"
YCM:
let g:ycm_complete_in_comments = 1
let g:ycm_seed_identifiers_with_syntax = 1
let g:ycm_collect_identifiers_from_comments_and_strings = 1
I had the same issue with making both of them work together.
here is my .vimrc, you might find what you need:
" ----------------------------------------------------------------------------
" Autocompletion & Snippets Plugins
" ----------------------------------------------------------------------------
if has('nvim')
runtime! python_setup.vim
endif
Plug 'Valloric/YouCompleteMe', { 'do': './install.sh --clang-completer' }
Plug 'SirVer/ultisnips'
Plug 'ladislas/vim-snippets'
" YouCompleteMe setup
let g:ycm_autoclose_preview_window_after_completion = 1
let g:ycm_filetype_blacklist={'unite': 1}
let g:ycm_min_num_of_chars_for_completion = 1
nnoremap <leader>jd :YcmCompleter GoToDefinitionElseDeclaration<CR>
" UltiSnips setup
let g:UltiSnipsExpandTrigger='<c-k>'
let g:UltiSnipsJumpForwardTrigger='<c-k>'
let g:UltiSnipsJumpBackwardTrigger='<c-s-k>'
let g:UltiSnipsSnippetsDir=plugDir.'/vim-snippets/UltiSnips'
Hope this helps.