12
43
Fork
You've already forked zig.vim
10

Disable colors #121

Open
manliop wants to merge 1 commit from manliop/zig.vim:disable-colors into master
pull from: manliop/zig.vim:disable-colors
merge into: ziglang:master
ziglang:master
ziglang:cwd-zig-exe-injection
First-time contributor
Copy link

The Zig compiler enables colors by default, but this is a problem for
Vim, since the error message buf shows the ANSI escape codes.

Disable colors by setting the NO_COLOR environment variable in ftplugin.
Since the environment variable is internal to Vim, it will not disable
colors when using a terminal.

The Zig compiler enables colors by default, but this is a problem for Vim, since the error message buf shows the ANSI escape codes. Disable colors by setting the NO_COLOR environment variable in ftplugin. Since the environment variable is internal to Vim, it will not disable colors when using a terminal.
The Zig compiler enables colors by default, but this is a problem for
Vim, since the error message buf shows the ANSI escape codes.
Disable colors by setting the NO_COLOR environment variable in ftplugin.
Since the environment variable is internal to Vim, it will not disable
colors when using a terminal.
Collaborator
Copy link

I tested a stock vim configuration without this change and observed no escape codes in the :make build and fmt autosave output. Could you explain in more detail how you managed to observe the issue you are trying to fix here. Reproduction steps (e.g. OS, vim config, commands) would be greatly appreciated.

I tested a stock vim configuration without this change and observed no escape codes in the `:make build` and fmt autosave output. Could you explain in more detail how you managed to observe the issue you are trying to fix here. Reproduction steps (e.g. OS, vim config, commands) would be greatly appreciated.
Author
First-time contributor
Copy link

I don't remember when this issue started.
For now I can send a screenshot.

Thanks.

I don't remember when this issue started. For now I can send a screenshot. Thanks.
Author
First-time contributor
Copy link

This is my and archlinux configuration:

~/.config/vim/vimrc

set nocompatible
set hidden
set encoding=utf-8
set fileencoding=utf-8
set textwidth=99
set colorcolumn=80,100
" Clipboard Support
" Adapted from mswin.vim
if has("clipboard")
 " CTRL-X and SHIFT-Del are Cut
 vnoremap <C-X> "+x
 vnoremap <S-Del> "+x
 " CTRL-C and CTRL-Insert are Copy
 vnoremap <C-C> "+y
 vnoremap <C-Insert> "+y
 " CTRL-V and SHIFT-Insert are Paste
 map <C-V>		"+gP
 map <S-Insert>		"+gP
 cmap <C-V>		<C-R>+
 cmap <S-Insert>		<C-R>+
endif
"
" Syntax Highligth Support
"
syntax on
" custom syntax used to catch unwanted tabs
syntax match Tabs /\t/
" highlight Tab gui=underline guifg=blue
filetype plugin indent on
set formatoptions=tcq
" Fix incorrect highlight for negative integers
"highlight link yamlPlainScalar yamlInteger
"
" Spelling Support
"
" spelling
set spell spelllang=en_us,it
"
" GUI Support
"
set guifont=Fira\ Code\ 14
" Use the same clipboard as the other GUI applications
set clipboard=unnamed
"
" Printing Support
"
set printdevice=HP_OfficeJet_Pro_8210
set printoptions=paper:A4,duplex:long,header:0,left:5pc,number:n,syntax:y,wrap:y,formfeed:y
set printheader=""
set printfont=Inconsolata:h12
"
" Plugins and other
"
" vim-powerline
set wildmenu
set laststatus=2
let g:Powerline_symbols = 'fancy'
" XML auto closing tags
" http://vim.wikia.com/wiki/Auto_closing_an_HTML_tag
:iabbrev </ </<C-X><C-O>
"
" Trailer
"
set secure

/etc/vimrc

" All system-wide defaults are set in $VIMRUNTIME/archlinux.vim (usually just
" /usr/share/vim/vimfiles/archlinux.vim) and sourced by the call to :runtime
" you can find below. If you wish to change any of those settings, you should
" do it in this file (/etc/vimrc), since archlinux.vim will be overwritten
" everytime an upgrade of the vim packages is performed. It is recommended to
" make changes after sourcing archlinux.vim since it alters the value of the
" 'compatible' option.
" This line should not be removed as it ensures that various options are
" properly set to work with the Vim-related packages.
runtime! archlinux.vim
" If you prefer the old-style vim functionalty, add 'runtime! vimrc_example.vim'
" Or better yet, read /usr/share/vim/vim80/vimrc_example.vim or the vim manual
" and configure vim to your own liking!
" do not load defaults if ~/.vimrc is missing
"let skip_defaults_vim=1
This is my and archlinux configuration: # ~/.config/vim/vimrc ```vim set nocompatible set hidden set encoding=utf-8 set fileencoding=utf-8 set textwidth=99 set colorcolumn=80,100 " Clipboard Support " Adapted from mswin.vim if has("clipboard") " CTRL-X and SHIFT-Del are Cut vnoremap <C-X> "+x vnoremap <S-Del> "+x " CTRL-C and CTRL-Insert are Copy vnoremap <C-C> "+y vnoremap <C-Insert> "+y " CTRL-V and SHIFT-Insert are Paste map <C-V> "+gP map <S-Insert> "+gP cmap <C-V> <C-R>+ cmap <S-Insert> <C-R>+ endif " " Syntax Highligth Support " syntax on " custom syntax used to catch unwanted tabs syntax match Tabs /\t/ " highlight Tab gui=underline guifg=blue filetype plugin indent on set formatoptions=tcq " Fix incorrect highlight for negative integers "highlight link yamlPlainScalar yamlInteger " " Spelling Support " " spelling set spell spelllang=en_us,it " " GUI Support " set guifont=Fira\ Code\ 14 " Use the same clipboard as the other GUI applications set clipboard=unnamed " " Printing Support " set printdevice=HP_OfficeJet_Pro_8210 set printoptions=paper:A4,duplex:long,header:0,left:5pc,number:n,syntax:y,wrap:y,formfeed:y set printheader="" set printfont=Inconsolata:h12 " " Plugins and other " " vim-powerline set wildmenu set laststatus=2 let g:Powerline_symbols = 'fancy' " XML auto closing tags " http://vim.wikia.com/wiki/Auto_closing_an_HTML_tag :iabbrev </ </<C-X><C-O> " " Trailer " set secure ``` # /etc/vimrc ```vim " All system-wide defaults are set in $VIMRUNTIME/archlinux.vim (usually just " /usr/share/vim/vimfiles/archlinux.vim) and sourced by the call to :runtime " you can find below. If you wish to change any of those settings, you should " do it in this file (/etc/vimrc), since archlinux.vim will be overwritten " everytime an upgrade of the vim packages is performed. It is recommended to " make changes after sourcing archlinux.vim since it alters the value of the " 'compatible' option. " This line should not be removed as it ensures that various options are " properly set to work with the Vim-related packages. runtime! archlinux.vim " If you prefer the old-style vim functionalty, add 'runtime! vimrc_example.vim' " Or better yet, read /usr/share/vim/vim80/vimrc_example.vim or the vim manual " and configure vim to your own liking! " do not load defaults if ~/.vimrc is missing "let skip_defaults_vim=1 ```
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u disable-colors:manliop-disable-colors
git switch manliop-disable-colors
Sign in to join this conversation.
No reviewers
Labels
Clear labels
bounty
https://ziglang.org/news/announcing-donor-bounties
bug
Observed behavior contradicts documented or intended behavior.
contributor-friendly
This issue is limited in scope and/or knowledge of project internals.
downstream
An issue with a third-party project that uses this project.
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
infra
An issue related to project infrastructure, e.g. continuous integration.
optimization
A task to improve performance and/or resource usage.
question
No questions on the issue tracker; use a community space instead.
regression
Something that used to work in a previous version stopped working
upstream
An issue with a third-party project that this project uses.
use case
Describes a real use case that is difficult or impossible, but does not propose a solution.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
ziglang/zig.vim!121
Reference in a new issue
ziglang/zig.vim
No description provided.
Delete branch "manliop/zig.vim:disable-colors"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?