Skip to content

Commit 39de481

Browse files
authored
New version release (#57)
* [fix] Use the correct line length in black: respect the ``textwidth`` set. * Set text width to 120 * SQL formatting file: Uppercase the SQL-words. * Remove isort from Python auto-fixing file * Makefile: fix installation for syntax files * Initial support for Cython (Fixes#55) * no wrap for Python files * Larger syntax highlighting * Also include *.pxi files as cython types * Set soft-warpping=2 for YAML files
1 parent eadc6da commit 39de481

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

.vimrc

+17-7
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ set autowriteall
4646
set hidden
4747

4848
set nomodeline
49-
set nomodelineexpr
49+
5050

5151
"" Where to open new windows
5252
set splitright
@@ -58,7 +58,7 @@ set scrolloff=10
5858
"" Performance improvements
5959
set lazyredraw
6060
set ttyfast
61-
set synmaxcol=120
61+
set synmaxcol=300
6262

6363
"" Do not ring errors
6464
set noerrorbells
@@ -176,14 +176,24 @@ set statusline=%!SetCustomStatusLine('')
176176
map <F2> :call ToggleLangCheck()<CR>
177177
set pastetoggle=<F4>
178178

179+
"" Other configurations
180+
181+
""" Python: Highlight everything
182+
let g:python_highlight_all = 1
183+
""" Remove trailing white spaces upon saving
184+
autocmd BufWritePre * :%s/\s\+$//e
179185
nnoremap <leader>e :set number!<CR>
186+
187+
""" Configurations per file type
180188
autocmd FileType xml map <F3> :call FormatXML()<CR>
181-
"" Remove trailing white spaces upon saving
182-
autocmd BufWritePre * :%s/\s\+$//e
183-
"" Python: Highlight everything
184-
let g:python_highlight_all = 1
185189
190+
augroup yaml_ft
191+
au!
192+
autocmd FileType yaml setlocal shiftwidth=2 tabstop=2
193+
augroup END
194+
195+
"" Set filetypy=cython according to the extension
186196
augroup cython_ft
187197
au!
188-
autocmd BufNewFile,BufRead *.{pyx,pxd} set ft=cython
198+
autocmd BufNewFile,BufRead *.{pyx,pxd,pxi} set filetype=cython
189199
augroup END

after/ftplugin/python.vim

+2
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ function! AutofixPy()
2020
endfunction
2121

2222
map <F3> :call AutofixPy()<CR>
23+
"" Do not automatically wrap code to the max length
24+
setlocal nowrap

0 commit comments

Comments
 (0)