This is kinda annoying and Google is giving me wrong answers.
Whenever I paste text from the clipboard into vim, it replaces all occurrences of 256 with <t_Co>.
I use vim in gnome-terminal
vim version is
:version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 24 2016 16:44:48)
Included patches: 1-1689
Extra patches: 8.0.0056
Modified by [email protected]
Compiled by [email protected]
Huge version without GUI. Features included (+) or not (-):
+acl -clipboard +dialog_con +file_in_path +job +menu -mouse_sysmouse +persistent_undo +scrollbind -tcl +visual -xim
+arabic +cmdline_compl +diff +find_in_path +jumplist +mksession +mouse_urxvt +postscript +signs +terminfo +visualextra -xsmp
+autocmd +cmdline_hist +digraphs +float +keymap +modify_fname +mouse_xterm +printer +smartindent +termresponse +viminfo -xterm_clipboard
-balloon_eval +cmdline_info -dnd +folding +langmap +mouse +multi_byte +profile +startuptime +textobjects +vreplace -xterm_save
-browse +comments -ebcdic -footer +libcall -mouseshape +multi_lang -python +statusline +timers +wildignore -xpm
++builtin_terms +conceal +emacs_tags +fork() +linebreak +mouse_dec -mzscheme +python3 -sun_workshop +title +wildmenu
+byte_offset +cryptv +eval +gettext +lispindent +mouse_gpm +netbeans_intg +quickfix +syntax -toolbar +windows
+channel +cscope +ex_extra -hangul_input +listcmds -mouse_jsbterm +packages +reltime +tag_binary +user_commands +writebackup
+cindent +cursorbind +extra_search +iconv +localmap +mouse_netterm +path_extra +rightleft +tag_old_static +vertsplit -X11
-clientserver +cursorshape +farsi +insert_expand -lua +mouse_sgr -perl -ruby -tag_any_white +virtualedit -xfontset
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -Wdate-time -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lm -ltinfo -lnsl -lselinux -lacl -lattr -lgpm -ldl -L/usr/lib/python3.5/config-3.5m-x86_64-l
inux-gnu -lpython3.5m -lpthread -ldl -lutil -lm
My vim config is
"-----GENERAL-----
"The default leader is a backslash, but we use ','
let mapleader = ','
"Fix backsapce key"
set backspace=indent,eol,start
"Set language for spell check
setlocal spell spelllang=en_us
"Fixing tabs and indentation
set tabstop=4
set expandtab
set shiftwidth=4
set autoindent
set smartindent
set cindent
"Refresh buffer
set autoread
"-----VUNDLE-----
so ~/.vim/plugins.vim
"-----VISUAL-----
"Syntax highlighting
syntax enable
"From https://github.com/gosukiwi/vim-atom-dark
colorscheme atom-dark-256
set t_Co=256
"Force 256 colors in terminal
set t_CO=256
"Show line numbers
set number
"Show column length
set ruler
"Show visual mark at the 80th character
set colorcolumn=80
highlight OverLength ctermbg=red ctermfg=white guibg=#592929
match OverLength /\%81v.\+/
"-----MAPPINGS-----
"Quick edit .vimrc
nmap <Leader>ev :tabedit $MYVIMRC<cr>
"Removes the highlighted search results
nmap <Leader><space> :nohlsearch<cr>
nmap <Leader>d :NERDTreeToggle<cr>
"-----SPLIT-MANAGEMENT-----
nmap <C-J> <C-W><C-J>
nmap <C-K> <C-W><C-K>
nmap <C-H> <C-W><C-H>
nmap <C-L> <C-W><C-L>
"-----CtrlP-Binding-----
nmap <C-r> :CtrlPBufTag<cr>
"-----AUTO-COMMANDS-----
augroup autosourcing
autocmd!
"Auto sourcing the .vimrc file on safe
autocmd BufWritePost .vimrc source %
augroup END
"-----SEARCHING-----
set hlsearch
set incsearch
Try dropping these lines:
"Force 256 colors in terminal
set t_CO=256
The name is t_Co, not t_CO.
@brammool Thank you so much - this drove me crazy.
Most helpful comment
Try dropping these lines:
"Force 256 colors in terminal
set t_CO=256
The name is t_Co, not t_CO.