Skip to content

Commit 9c7dbf0

Browse files
committed
Add 'Align Text to Left, Center, and Right' section to Vim Tips.
1 parent e90e24e commit 9c7dbf0

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Python_Tips.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ Type "help", "copyright", "credits" or "license" for more information.
130130
```
131131

132132
### Deactivate
133-
Before we look at using our virtual environment, let's discuss how to _deactivate_ it. When we finished with a specific virtual environment, such as when we want to switch to another project, we want to make sure that we deactivate the virtual environment. This is necessary to avoid accidentally installing a package (or the wrong version of a package!) in that environment.
133+
Before we look at using our virtual environment, let's discuss how to _deactivate_ it. When we finish with a specific virtual environment, such as when we want to switch to another project, we want to make sure that we deactivate the virtual environment. This is necessary to avoid accidentally installing a package (or the wrong version of a package!) in that environment.
134134

135135
To deactivate our `venv`, we simply "undo" the _activate_ process from above. In Windows, run:
136136
```bash

Vim_Tips.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,12 @@ Likewise, to see the full path and file name of your _user_ configuration file,
6666
## Indent/Outdent Multiple Lines
6767
The quickest way to indent/outdent multiple lines is to enter **VISUAL** mode (press <kbd>v</kbd>), then select the desired rows using standard navigation (<kbd>j</kbd> and <kbd>k</kbd>). Then use <kbd>></kbd> to _indent_ and <kbd><</kbd> to _outdent_ the selected text.
6868

69-
[Reference](https://stackoverflow.com/a/7452318)
69+
[Reference](https://stackoverflow.com/a/7452318)
70+
71+
## Align Text to Left, Center, and Right
72+
In addition to indent/outdent, text can be [aligned](http://vimdoc.sourceforge.net/htmldoc/change.html#formatting) to left, center, and right. Simply select the desired text in **VISUAL** mode (or specify the range before the command) and use the appropriate command, `left` (which is essentially _indent_), `center`, or `right`, followed by a numeric modifier. For `left`, the modifier is the number of characters to indent; for `center` and `right`, the modifier is the **width** to use when aligning and it defaults [`textwidth`](http://vimdoc.sourceforge.net/htmldoc/options.html#'textwidth') (or 80 if `textwidth` is 0).
73+
74+
[Reference](https://vimtricks.com/p/vim-text-alignment/)
7075

7176
## Comment/Uncomment Multiple Lines
7277
Use [mark](http://vimdoc.sourceforge.net/htmldoc/motion.html#mark) to specify the range of lines to comment. In this example, we use the letter `t`.

0 commit comments

Comments
 (0)