You are looking for autocommands, something like this:
autocmd FileType python setlocal showmatch
Would set the showmatch
option only on buffers with the python filetype.
See :h :autocmd
.
" ###############################
" Settings I want for all files #
" ###############################
" enable syntax highlighting for all the languages vim recognizes by default
syntax enable
" indent when moving to the next line while writing code
set autoindent
" show the matching part of the pair for [] {} and ()
set showmatch
" ########################################
" Settings related to python development #
" ########################################
autocmd Filetype python
\ setlocal ts=4 |
\ setlocal expandtab
" enable all Python syntax highlighting features
" it doesn't highlight issues on other files even
" though it's not in autocmd. Don't know
let python_highlight_all = 1
:h ftplugins
,:h ftplugin
, and:h vimfiles
.