I want to create different vim files for different task in vim. I know you you can create different vim files, which can be loaded on the fly based on the extension of the file. My problem is I am using vundle to maintain plugins and I really don't know how to separate these plugins in different files.
I searched about separating vim and I found you can use ftplugin, something like ftplugin/python.vim or ftplugin/matlab.vim. But I don't know should I write vundle part in each .vim file or everything should be in one vim file. Please let me know if you need more information. Below is my current .vimrc file.
" Configuration file for vim
set modelines=0 " CVE-2007-2438
" Normally we use vim-extensions. If you want true vi-compatibility
" remove change the following statements
set nocompatible " Use Vim defaults instead of 100% vi compatibility
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
"===================================================================
"Plugins
" let Vundle manage Vundle, required
Plugin 'gmarik/Vundle.vim'
" For autocomplete
Bundle 'Valloric/YouCompleteMe'
" For folding
Plugin 'tmhedberg/SimpylFold'
" For indent python
Plugin 'vim-scripts/indentpython.vim'
" For syntax
Plugin 'w0rp/ale'
" Check Python files with flake8 and pylint.
let b:ale_linters = ['flake8', 'pylint']
" Fix Python files with autopep8 and yapf.
let b:ale_fixers = ['autopep8', 'yapf']
" Disable warnings about trailing whitespace for Python files.
let b:ale_warn_about_trailing_whitespace = 0
syntax on
" For color Schemes
"Plugin 'jnurmine/Zenburn'
Plugin 'flazz/vim-colorschemes'
Plugin 'morhetz/gruvbox'
" For PowerLine
"Plugin 'powerline/powerline', {'rtp': 'powerline/bindings/vim/'}
Plugin 'vim-airline/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
"For the nerd tree
Plugin 'scrooloose/nerdtree'
" add all your plugins here (note older versions of Vundle
" used Bundle instead of Plugin)
" ...
" All of your Plugins must be added before the following line
call vundle#end() " required
filetype plugin indent on " required
"===================================================================
" For UTF-8
set encoding=utf-8
"System Clipboard
if has('mac')
set clipboard=unnamed
elseif has('unix')
set clipboard=unnamedplus
endif
"set Line Numbering
set nu
"to handle the backspace problem
set bs=2
"Set up mouse
set mouse=a
"For Highlighting searched text
set hlsearch
"For confirming before exit (save)
set confirm
"Maping Ctrl+A for select all
map <C-a> <esc>ggVG<CR>
"===================================================================
" Mapping NERDtree toggling
nmap <F6> :NERDTreeToggle<CR>
"===================================================================
"Few settings for plugins
" colorscheme
colorscheme py-darcula
" to see the docstrings for folded code
let g:SimpylFold_docstring_preview=1
let mapleader=" "
"The first line ensures that the auto-complete window goes away when you’re
"done with it, and the second defines a shortcut for goto definition (second
"one I need to learn)
let g:ycm_autoclose_preview_window_after_completion=1
let g:ycm_min_num_of_chars_for_completion = 1
"map <leader>g :YcmCompleter GoToDefinition<CR>
"To handle vitural env for YCM
let g:ycm_python_binary_path = 'python3'
.vimrcand they should only take effect when you are editing Python. Similarly, note-taking plugins will usually only affect certain text formats (and you can usually configure which ones if they affect multiple formats). - bk2204