Skip to main content
edited body
Source Link
Martin Tournoij
  • 63.3k
  • 26
  • 199
  • 274

I use localvimrc for this purpose.

Put a .lvimrc with your project settings inside your project and these settings will override settings in .vimrc.

By default, you will be asked if you want to source this file, eg:

localvimrc: source /home/martin/code/.lvimrc? ([y]es/[n]o/[a]ll/[q]uit) 

This is to prevent sourcing random (untrusted) vimrc files. If you find this annoying, you can setup a whitelist of .lvimrc files with g:localvimrc_whitelist:

let g:localvimrc_whitelist = '/home/martin/code/.lvimrc'

Or you can just disable asking for confirmation completely with ketset g:localvimrc_ask = 0. This is not recommended, though.

I use localvimrc for this purpose.

Put a .lvimrc with your project settings inside your project and these settings will override settings in .vimrc.

By default, you will be asked if you want to source this file, eg:

localvimrc: source /home/martin/code/.lvimrc? ([y]es/[n]o/[a]ll/[q]uit) 

This is to prevent sourcing random (untrusted) vimrc files. If you find this annoying, you can setup a whitelist of .lvimrc files with g:localvimrc_whitelist:

let g:localvimrc_whitelist = '/home/martin/code/.lvimrc'

Or you can just disable asking for confirmation completely with ket g:localvimrc_ask = 0. This is not recommended, though.

I use localvimrc for this purpose.

Put a .lvimrc with your project settings inside your project and these settings will override settings in .vimrc.

By default, you will be asked if you want to source this file, eg:

localvimrc: source /home/martin/code/.lvimrc? ([y]es/[n]o/[a]ll/[q]uit) 

This is to prevent sourcing random (untrusted) vimrc files. If you find this annoying, you can setup a whitelist of .lvimrc files with g:localvimrc_whitelist:

let g:localvimrc_whitelist = '/home/martin/code/.lvimrc'

Or you can just disable asking for confirmation completely with set g:localvimrc_ask = 0. This is not recommended, though.

Add some more info
Source Link
Martin Tournoij
  • 63.3k
  • 26
  • 199
  • 274

I use localvimrc for this purpose.

Put a .lvimrc with your project settings inside your project and these settings will override settings in .vimrc.

By default, you will be asked if you want to source this file, eg:

localvimrc: source /home/martin/code/.lvimrc? ([y]es/[n]o/[a]ll/[q]uit) 

This is to prevent sourcing random (untrusted) vimrc files. If you find this annoying, you can setup a whitelist of .lvimrc files with g:localvimrc_whitelist:

let g:localvimrc_whitelist = '/home/martin/code/.lvimrc'

Or you can just disable asking for confirmation completely with ket g:localvimrc_ask = 0. This is not recommended, though.

I use localvimrc for this purpose.

Put a .lvimrc with your project settings inside your project and these settings will override settings in .vimrc.

I use localvimrc for this purpose.

Put a .lvimrc with your project settings inside your project and these settings will override settings in .vimrc.

By default, you will be asked if you want to source this file, eg:

localvimrc: source /home/martin/code/.lvimrc? ([y]es/[n]o/[a]ll/[q]uit) 

This is to prevent sourcing random (untrusted) vimrc files. If you find this annoying, you can setup a whitelist of .lvimrc files with g:localvimrc_whitelist:

let g:localvimrc_whitelist = '/home/martin/code/.lvimrc'

Or you can just disable asking for confirmation completely with ket g:localvimrc_ask = 0. This is not recommended, though.

Source Link
OrangeTux
  • 3.6k
  • 3
  • 20
  • 27

I use localvimrc for this purpose.

Put a .lvimrc with your project settings inside your project and these settings will override settings in .vimrc.