Skip to content

Commit 8feee65

Browse files
authored
Merge pull request #60 from rmariano/develop
v0.14-RC
2 parents 8c43178 + ec6dcf5 commit 8feee65

File tree

5 files changed

+42
-20
lines changed

5 files changed

+42
-20
lines changed

.vimrc

+15-7
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ endfunction
155155

156156
function! ToggleLangCheck()
157157
if !&spell
158-
setlocal spell spelllang=en_gb
158+
setlocal spell spelllang=en_us
159159
set statusline=%!SetCustomStatusLine('[spell]')
160160
else
161161
setlocal nospell
@@ -168,12 +168,25 @@ function! FormatXML()
168168
echom "Formatting XML file"
169169
execute ":silent %!xmllint --format --recover - 2>/dev/null"
170170
endfunction
171-
"" End function definitions
171+
172+
function! CopyContentToClipboard()
173+
if executable("clip.exe")
174+
execute ":silent '<,'>w !clip.exe"
175+
elseif executable("xclip")
176+
execute ":silent '<,'>w !xclip"
177+
elseif executable("pbcopy")
178+
execute ":silent '<,'>w !pbcopy"
179+
endif
180+
endfunction
181+
"" End of function definitions
172182

173183
"" Mark the limit of <text-width>
174184
nnoremap <leader>j :call TogglePageLimit()<CR>
175185
nnoremap ;t :call SearchDevTags()<CR>
176186
187+
"" Copy selected content (visual model) to clipboard
188+
vnoremap <C-C> :call CopyContentToClipboard()<CR>
189+
177190
set statusline=%!SetCustomStatusLine('')
178191
map <F2> :call ToggleLangCheck()<CR>
179192
set pastetoggle=<F4>
@@ -189,11 +202,6 @@ nnoremap <leader>e :set number!<CR>
189202
""" Configurations per file type
190203
autocmd FileType xml map <F3> :call FormatXML()<CR>
191204
192-
augroup yaml_ft
193-
au!
194-
autocmd FileType yaml setlocal shiftwidth=2 tabstop=2
195-
augroup END
196-
197205
"" Set filetypy=cython according to the extension
198206
augroup cython_ft
199207
au!

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2013 - 2021 Mariano Anaya
3+
Copyright (c) 2013 - 2022 Mariano Anaya
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy of
66
this software and associated documentation files (the "Software"), to deal in

README.rst

+13-9
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ a particular configuration for improved productivity.
1111
The goal is to develop a good configuration for the Vim editor, tailored
1212
for Python development.
1313

14-
It does not change the behaviour of VIM, since this configuration only
14+
It does not change the behavior of VIM, since this configuration only
1515
adds comfortable shortcuts, and settings that are recommended for
1616
software development (coding good practices).
1717

@@ -67,7 +67,7 @@ files for this project (not the extra packages, though).
6767

6868
Features
6969
--------
70-
The leader key (``<leader>``) can be customised, but it's mapped to ``-`` by
70+
The leader key (``<leader>``) can be customized, but it's mapped to ``-`` by
7171
default.
7272

7373
* ``<leader>`` + ``j``: Toggle the margin at the column number set by ``textwidth``.
@@ -96,7 +96,9 @@ default.
9696

9797
* ``<leader>`` + ``nh`` as a shortcut for ``:nohlsearch`` (No highlight).
9898

99-
* A colour scheme I like.
99+
* A color scheme I like.
100+
101+
* Customizations for certain file types: Python, YAML, XML, and more to come over time.
100102

101103
* A status line with useful information (file name with path, modification
102104
flag, file type, column, lines, and position (in %).
@@ -128,28 +130,30 @@ default.
128130
* ``<C-j>``: for moving between splits (instead of ``<C-W><C-j>``).
129131
Same for ``h``, ``k``, or ``l`` respectively.
130132

133+
* `Ctrl` + `C`: Copy selected content to clipboard.
134+
131135
* Other features
132136

133137
* ``scrolloff=10``: offset of 10 lines when scrolling
134138
* Performance improvements
135139
* Silent bells
136140
* Set hidden buffers
137141

138-
Colour scheme
139-
-------------
142+
Color scheme
143+
------------
140144

141-
The colour scheme requires the terminal to support 256 colours. Most of the
145+
The color scheme requires the terminal to support 256 colors. Most of the
142146
terminals already support this, but some terminal multiplexers like ``tmux``
143147
might require to be run as: ``tmux -2`` in order to support this.
144148

145149
In addition, just the command-line classic Vim version is supported, so no
146-
support for ``Gvim`` or graphical versions is included for the colour scheme,
150+
support for ``Gvim`` or graphical versions is included for the color scheme,
147151
although pull requests are welcomed.
148152

149153
Captures
150154
^^^^^^^^
151155

152-
Here are some examples of how the colour scheme looks like.
156+
Here are some examples of how the color scheme looks like.
153157

154158
.. image:: https://rmariano.github.io/itarch/vim-capture1.png
155159
:target: https://rmariano.github.io/itarch/vim-capture1.png
@@ -185,7 +189,7 @@ Dependencies
185189
------------
186190

187191
* Vim 8+
188-
* Linux (Other platforms are supported on a best-effort basis).
192+
* Linux, OSX (Other platforms are supported on a best-effort basis).
189193

190194

191195
External plug-ins

after/ftplugin/yaml.vim

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
"" YAML configuration
2+
3+
"" Comment (c) / uncomment (u) lines
4+
noremap <leader>c :s/^/#/g<CR>:let @/ = ""<CR>
5+
vnoremap <leader>c :s/^/#/g<CR>:let @/ = ""<CR>
6+
noremap <leader>u :s/^#//g<CR>:let @/ = ""<CR>
7+
vnoremap <leader>u :s/^#//g<CR>:let @/ = ""<CR>
8+
9+
setlocal shiftwidth=2 tabstop=2

syntax/python.vim

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
" Current Maintainer: Dmitry Vasiliev <dima at hlabs dot org>
44
" Previous Maintainer: Neil Schemenauer <nas at python dot ca>
55
" URL: https://github.com/hdima/python-syntax
6-
" Last Change: 2015-11-01
6+
" Last Change: 2021-12-03
77
" Filenames: *.py
8-
" Version: 3.6.0
8+
" Version: 3.10.0
99
"
1010
" Based on python.vim (from Vim 6.1 distribution)
1111
" by Neil Schemenauer <nas at python dot ca>
@@ -157,6 +157,8 @@ syn keyword pythonStatement global assert
157157
syn keyword pythonStatement lambda
158158
syn keyword pythonStatement with
159159
syn keyword pythonStatement def class nextgroup=pythonFunction skipwhite
160+
syn keyword pythonStatement match
161+
syn keyword pythonStatement case
160162
syn keyword pythonRepeat for while
161163
syn keyword pythonConditional if elif else
162164
" The standard pyrex.vim unconditionally removes the pythonInclude group, so
@@ -493,7 +495,6 @@ endif
493495

494496
syn keyword pythonConvention self
495497
syn keyword pythonConvention cls
496-
syn keyword pythonConvention __dict__
497498

498499

499500
if s:Enabled("g:python_slow_sync")

0 commit comments

Comments
 (0)