Just getting back into it after a few years and trying to set up Vim nicely how I remember it as when I started coding the settings came back to me of how I used to have them but been mucking about for about an hour now and not found what I want and frustrated as I want to get back to the project I was working on!
I am on Debian and apparently the update-alternatives preferred version is vim.gtk3, which I thought was the fully featured one? when I do some command I read on an article to check python compatbility with a a grep it shows both -python and +python but also a command shows +python3 so I am confused on where I stand in that department?
My current .vimrc:
autocmd BufNewFile,BufRead *.py set filetype=python
set showcmd
set viminfo="0"
set number
syntax on
set clipboard=unnamedplus
set autoindent expandtab tabstop=2 shiftwidth=2
set smartindent
filetype plugin indent on
What I was missing before was indenting when I do def function():. The last line has enabled indenting now but it is the 4 spaces where I want 2 spaces as per the settings above. So how to get to the right spacing? not been able to find how to change that.
Also how do I indent chunks of code? I know you can use V in Vim for that but I seem to remember there was another way when I was coding? If I write a chunk out of a function for example and decide to put it inside one after then how would I indent the chunk to the 2 spacing I want as my default?
I shall continue coding for now with the impoverished settings I have currently, eagerly awaiting replies. ![]()
EDIT: Indenting just came back to me: Sh + >
Just have to know about the correct spacing for colon Enter.