Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
allworldit
awit-vim-superawesome
Commits
6887f35d
Commit
6887f35d
authored
Jun 04, 2019
by
Nigel Kukard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better support for Python and PEP08
parent
ccd17023
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
7 deletions
+21
-7
vimrc
vimrc
+21
-7
No files found.
vimrc
View file @
6887f35d
...
...
@@ -9,8 +9,6 @@ set shiftwidth=4
syntax on
" Filetypes based on extension
filetype on
au BufNewFile,BufRead *.md set filetype=markdown
au BufNewFile,BufRead *.html.ep set filetype=php
" Show edit window details in bar at bottom
set title
...
...
@@ -34,7 +32,6 @@ highlight CursorColumn ctermbg=238
" Set color of end of line for programming
highlight ColorColumn ctermbg=238
set colorcolumn=132
" Highlight line we're on
highlight CursorLine cterm=none ctermbg=235
...
...
@@ -42,10 +39,27 @@ set cursorline
" Highlight messed up tab/spaces
highlight ExtraWhitespaces ctermbg=202
call matchadd('ExtraWhitespaces',' \t')
call matchadd('ExtraWhitespaces','\t ')
call matchadd('ExtraWhitespaces','^ ')
call matchadd('ExtraWhitespaces','\s\+$')
" Switch whitespace handling based on file type
function! WhitespaceHighlight()
if &filetype == 'python'
call matchadd('ExtraWhitespaces','^\t')
set colorcolumn=79
elseif &filetype != ''
call matchadd('ExtraWhitespaces',' \t')
call matchadd('ExtraWhitespaces','\t ')
call matchadd('ExtraWhitespaces','^ ')
set colorcolumn=132
endif
call matchadd('ExtraWhitespaces','\s\+$')
endfunction
" Autocmd
au BufNewFile,BufRead * call WhitespaceHighlight()
au BufNewFile,BufRead *.md set filetype=markdown | call WhitespaceHighlight()
au BufNewFile,BufRead *.html.ep set filetype=php | call WhitespaceHighlight()
au BufNewFile,BufRead *.py set filetype=python | set expandtab softtabstop=4 | call WhitespaceHighlight()
" Don't use backup files
set nobackup
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment