this is my first steps in vim and I've started this from a config generated by vim-bootstrap service for neovim and c++ specific development. so I'm currently studying enabled plugins. could someone explain me why there is a different colouring depends I'm opening c++ source from nerdtree panel or via usual :eopening from :e - set filetype is cpp; fileformat is unixopening from nerdtree - filetype is cpp; fileformat is unix  so not difference in those valueshere is a content of a config: vim-bootstrap 3340bde***************************************************************************** Vim-PLug core*****************************************************************************if has('vim_starting')  set nocompatible                Be iMprovedendiflet vimplug_exists=expand('~/.config/nvim/autoload/plug.vim')if !filereadable(vimplug_exists)  if !executable(curl)    echoerr You have to install curl or first install vim-plug yourself!    execute q!  endif  echo Installing Vim-Plug...  echo   silent !\curl -fLo ~/.config/nvim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim  let g:not_finish_vimplug = yes  autocmd VimEnter * PlugInstallendif Required:call plug#begin(expand('~/.config/nvim/plugged'))***************************************************************************** Plug install packages*****************************************************************************Plug 'scrooloose/nerdtree'Plug 'jistr/vim-nerdtree-tabs'Plug 'tpope/vim-commentary'Plug 'tpope/vim-fugitive'Plug 'vim-airline/vim-airline'Plug 'vim-airline/vim-airline-themes'Plug 'airblade/vim-gitgutter'Plug 'vim-scripts/grep.vim'Plug 'vim-scripts/CSApprox'Plug 'bronson/vim-trailing-whitespace'Plug 'Raimondi/delimitMate'Plug 'majutsushi/tagbar'Plug 'scrooloose/syntastic'Plug 'Yggdroot/indentLine'Plug 'sheerun/vim-polyglot'if isdirectory('/usr/local/opt/fzf')  Plug '/usr/local/opt/fzf' | Plug 'junegunn/fzf.vim'else  Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --bin' }  Plug 'junegunn/fzf.vim'endiflet g:make = 'gmake'if exists('make')        let g:make = 'make'endifPlug 'Shougo/vimproc.vim', {'do': g:make} Vim-SessionPlug 'xolox/vim-misc'Plug 'xolox/vim-session'if v:version >= 703  Plug 'Shougo/vimshell.vim'endifif v:version >= 704   Snippets  Plug 'SirVer/ultisnips'endifPlug 'honza/vim-snippets' ColorPlug 'tomasr/molokai'***************************************************************************** Custom bundles***************************************************************************** cPlug 'vim-scripts/c.vim', {'for': ['c', 'cpp']}Plug 'ludwig/split-manpage.vim'********************************************************************************************************************************************************** Include user's extra bundleif filereadable(expand(~/.config/nvim/local_bundles.vim))  source ~/.config/nvim/local_bundles.vimendifcall plug#end() Required:filetype plugin indent on***************************************************************************** Basic Setup***************************************************************************** Encodingset encoding=utf-8set fileencoding=utf-8set fileencodings=utf-8set bombset binary Fix backspace indentset backspace=indent,eol,start Tabs. May be overriten by autocmd rulesset tabstop=4set softtabstop=0set shiftwidth=4set expandtab Map leader to ,let mapleader=',' Enable hidden buffersset hidden Searchingset hlsearchset incsearchset ignorecaseset smartcase Directories for swp filesset nobackupset noswapfileset fileformats=unix,dos,macset showcmdif exists('$SHELL')    set shell=$SHELLelse    set shell=/bin/shendif session managementlet g:session_directory = ~/.config/nvim/sessionlet g:session_autoload = nolet g:session_autosave = nolet g:session_command_aliases = 1***************************************************************************** Visual Settings*****************************************************************************syntax onset rulerset numberlet no_buffers_menu=1if !exists('g:not_finish_vimplug')  colorscheme molokaiendifset mousemodel=popupset t_Co=256set guioptions=egmrtiset gfn=Monospace\ 10if has(gui_running)  if has(gui_mac) || has(gui_macvim)    set guifont=Menlo:h12    set transparency=7  endifelse  let g:CSApprox_loaded = 1   IndentLine  let g:indentLine_enabled = 1  let g:indentLine_concealcursor = 0  let g:indentLine_char = ''  let g:indentLine_faster = 1endif Disable the blinking cursor.set gcr=a:blinkon0set scrolloff=3 Status barset laststatus=2 Use modeline overridesset modelineset modelines=10set titleset titleold=Terminalset titlestring=%Fset statusline=%F%m%r%h%w%=(%{&ff}/%Y)\ (line\ %l\/%L,\ col\ %c)\ Search mappings: These will make it so that going to the next one in a search will center on the line it's found in.nnoremap n nzzzvnnoremap N Nzzzvif exists(*fugitive#statusline)  set statusline+=%{fugitive#statusline()}endif vim-airlinelet g:airline_theme = 'powerlineish'let g:airline#extensions#syntastic#enabled = 1let g:airline#extensions#branch#enabled = 1let g:airline#extensions#tabline#enabled = 1let g:airline#extensions#tagbar#enabled = 1let g:airline_skip_empty_sections = 1***************************************************************************** Abbreviations***************************************************************************** no one is really happy until you have this shortcutscnoreabbrev W! w!cnoreabbrev Q! q!cnoreabbrev Qall! qall!cnoreabbrev Wq wqcnoreabbrev Wa wacnoreabbrev wQ wqcnoreabbrev WQ wqcnoreabbrev W wcnoreabbrev Q qcnoreabbrev Qall qall NERDTree configurationlet g:NERDTreeChDirMode=2let g:NERDTreeIgnore=['\.rbc$', '\~$', '\.pyc$', '\.db$', '\.sqlite$', '__pycache__']let g:NERDTreeSortOrder=['^__\.py$', '\/$', '*', '\.swp$', '\.bak$', '\~$']let g:NERDTreeShowBookmarks=1let g:nerdtree_tabs_focus_on_files=1let g:NERDTreeMapOpenInTabSilent = '<RightMouse>'let g:NERDTreeWinPos = rightlet g:NERDTreeWinSize = 30set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.pyc,*.db,*.sqlitennoremap <silent> <F2> :NERDTreeFind<CR>noremap <F3> :NERDTreeToggle<CR> grep.vimnnoremap <silent> <leader>f :Rgrep<CR>let Grep_Default_Options = '-IR'let Grep_Skip_Files = '*.log *.db'let Grep_Skip_Dirs = '.git node_modules' vimshell.vimlet g:vimshell_user_prompt = 'fnamemodify(getcwd(), :~)'let g:vimshell_prompt =  '$ ' terminal emulationnnoremap <silent> <leader>sh :terminal<CR>***************************************************************************** Functions*****************************************************************************if !exists('*s:setupWrapping')  function s:setupWrapping()    set wrap    set wm=2    set textwidth=79  endfunctionendif***************************************************************************** Autocmd Rules***************************************************************************** The PC is fast enough, do syntax highlight syncing from start unless 200 linesaugroup vimrc-sync-fromstart  autocmd!  autocmd BufEnter * :syntax sync maxlines=200augroup END Remember cursor positionaugroup vimrc-remember-cursor-position  autocmd!  autocmd BufReadPost * if line('\) > 1 && line('\) <= line($) | exe normal! g`\ | endifaugroup END txtaugroup vimrc-wrapping  autocmd!  autocmd BufRead,BufNewFile *.txt call s:setupWrapping()augroup END make/cmakeaugroup vimrc-make-cmake  autocmd!  autocmd FileType make setlocal noexpandtab  autocmd BufNewFile,BufRead CMakeLists.txt setlocal filetype=cmakeaugroup ENDset autoread***************************************************************************** Mappings***************************************************************************** Splitnoremap <Leader>h :<C-u>split<CR>noremap <Leader>v :<C-u>vsplit<CR> Gitnoremap <Leader>ga :Gwrite<CR>noremap <Leader>gc :Gcommit<CR>noremap <Leader>gsh :Gpush<CR>noremap <Leader>gll :Gpull<CR>noremap <Leader>gs :Gstatus<CR>noremap <Leader>gb :Gblame<CR>noremap <Leader>gd :Gvdiff<CR>noremap <Leader>gr :Gremove<CR> session managementnnoremap <leader>so :OpenSession<Space>nnoremap <leader>ss :SaveSession<Space>nnoremap <leader>sd :DeleteSession<CR>nnoremap <leader>sc :CloseSession<CR> Tabsnnoremap <Tab> gtnnoremap <S-Tab> gTnnoremap <silent> <S-t> :tabnew<CR> Set working directorynnoremap <leader>. :lcd %:p:h<CR> Opens an edit command with the path of the currently edited file filled innoremap <Leader>e :e <C-R>=expand(%:p:h) . / <CR> Opens a tab edit command with the path of the currently edited file fillednoremap <Leader>te :tabe <C-R>=expand(%:p:h) . / <CR> fzf.vimset wildmode=list:longest,list:fullset wildignore+=*.o,*.obj,.git,*.rbc,*.pyc,__pycache__let $FZF_DEFAULT_COMMAND =  find * -path '*/\.*' -prune -o -path 'node_modules/**' -prune -o -path 'target/**' -prune -o -path 'dist/**' -prune -o  -type f -print -o -type l -print 2> /dev/null The Silver Searcherif executable('ag')  let $FZF_DEFAULT_COMMAND = 'ag --hidden --ignore .git -g '  set grepprg=ag\ --nogroup\ --nocolorendif ripgrepif executable('rg')  let $FZF_DEFAULT_COMMAND = 'rg --files --hidden --follow --glob !.git/*'  set grepprg=rg\ --vimgrep  command! -bang -nargs=* Find call fzf#vim#grep('rg --column --line-number --no-heading --fixed-strings --ignore-case --hidden --follow --glob !.git/* --color always '.shellescape(<q-args>).'| tr -d \017', 1, <bang>0)endifcnoremap <C-P> <C-R>=expand(%:p:h) . / <CR>nnoremap <silent> <leader>b :Buffers<CR>nnoremap <silent> <leader>e :FZF -m<CR> snippetslet g:UltiSnipsExpandTrigger=<tab>let g:UltiSnipsJumpForwardTrigger=<tab>let g:UltiSnipsJumpBackwardTrigger=<c-b>let g:UltiSnipsEditSplit=vertical syntasticlet g:syntastic_always_populate_loc_list=1let g:syntastic_error_symbol=''let g:syntastic_warning_symbol=''let g:syntastic_style_error_symbol = ''let g:syntastic_style_warning_symbol = ''let g:syntastic_auto_loc_list=1let g:syntastic_aggregate_errors = 1 Tagbarnmap <silent> <F4> :TagbarToggle<CR>let g:tagbar_autofocus = 1 Disable visualbellset noerrorbells visualbell t_vb=if has('autocmd')  autocmd GUIEnter * set visualbell t_vb=endif Copy/Paste/Cutif has('unnamedplus')  set clipboard=unnamed,unnamedplusendifnoremap YY +y<CR>noremap <leader>p +gP<CR>noremap XX +x<CR>if has('macunix')   pbcopy for OSX copy/paste  vmap <C-x> :!pbcopy<CR>  vmap <C-c> :w !pbcopy<CR><CR>endif Buffer navnoremap <leader>z :bp<CR>noremap <leader>q :bp<CR>noremap <leader>x :bn<CR>noremap <leader>w :bn<CR> Close buffernoremap <leader>c :bd<CR> Clean search (highlight)nnoremap <silent> <leader><space> :noh<cr> Switching windowsnoremap <C-j> <C-w>jnoremap <C-k> <C-w>knoremap <C-l> <C-w>lnoremap <C-h> <C-w>h Vmap for maintain Visual Mode after shifting > and <vmap < <gvvmap > >gv Move visual blockvnoremap J :m '>+1<CR>gv=gvvnoremap K :m '<-2<CR>gv=gv Open current line on GitHubnnoremap <Leader>o :.Gbrowse<CR>***************************************************************************** Custom configs***************************************************************************** cautocmd FileType c setlocal tabstop=4 shiftwidth=4 expandtabautocmd FileType cpp setlocal tabstop=4 shiftwidth=4 expandtab syntasticlet g:syntastic_python_checkers=['python', 'flake8'] vim-airlinelet g:airline#extensions#virtualenv#enabled = 1 Syntax highlight Default highlight is better than polyglotlet g:polyglot_disabled = ['python']let python_highlight_all = 1********************************************************************************************************************************************************** Include user's local vim configif filereadable(expand(~/.config/nvim/local_init.vim))  source ~/.config/nvim/local_init.vimendif***************************************************************************** Convenience variables***************************************************************************** vim-airlineif !exists('g:airline_symbols')  let g:airline_symbols = {}endifif !exists('g:airline_powerline_fonts')  let g:airline#extensions#tabline#left_sep = ' '  let g:airline#extensions#tabline#left_alt_sep = '|'  let g:airline_left_sep          = ''  let g:airline_left_alt_sep      = ''  let g:airline_right_sep         = ''  let g:airline_right_alt_sep     = ''  let g:airline#extensions#branch#prefix     = '' , ,   let g:airline#extensions#readonly#symbol   = ''  let g:airline#extensions#linecolumn#prefix = ''  let g:airline#extensions#paste#symbol      = ''  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 = ''else  let g:airline#extensions#tabline#left_sep = ''  let g:airline#extensions#tabline#left_alt_sep = ''   powerline symbols  let g:airline_left_sep = ''  let g:airline_left_alt_sep = ''  let g:airline_right_sep = ''  let g:airline_right_alt_sep = ''  let g:airline_symbols.branch = ''  let g:airline_symbols.readonly = ''  let g:airline_symbols.linenr = ''endif
different colour schemas depends how file is opened
neovim;colorscheme;filetype c++