For working with Python, a tool environment will be prepared to facilitate work using the keyboard:
- scoop: a program manager supporting open source
- micro: a console text editor
- setting environment variables, aliases and functions
Clone this repository to your computer:
- start terminal
- go (create) to the folder where you want to put the repository
git clone https://github.com/python-edu/01terminal_help.git- clone the repository
From Scoop:
- a command-line installer for Windows.
- Open a PowerShell terminal (version 5.1 or later) and from the PS C:> prompt, run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
a modern and intuitive terminal-based text editor
In the PowerShell terminal, type:
scoop install microor with winget:
winget install zyedidia.microIf you really don't want to learn micro you can use any other text editor e.g. Nnotepad++.
From fzf github:
- Warp, the intelligent terminal for developers
- Available for MacOS, Linux, & Windows
- fzf is a general-purpose command-line fuzzy finder
In the PowerShell terminal, type:
scoop install fzf
From df github:
fdis a program to find entries in your filesystem. It is a simple, fast and user-friendly alternative to find.
scoop install fdFrom bat:
A
cat(1)clone with syntax highlighting and Git integration.
scoop install batThe solutions in this section are intended for Windows users with a PowerShell terminal. Commands are executed in the
terminal or saved to a special configuration file, the location of which is set in the $PROFILE environment variable.
- PROFILE
$PROFILE: A PowerShell system variable that stores the path to the user'sprofile file. This is a script that is automatically executed when PowerShell starts. In the PowerShell terminal:
echo $PROFILE: this will show you the location of the PowerShell configuration file eg.:C:\Users\test1\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1dir Documents: this will show if there is a folderWindowsPowerShellin theDocumentsdirectory. If theWindowsPowerShelldirectory does not exist it should be created:mkdir .\Documents\WindowsPowerShell- to make
PowerShellconfiguration easier you can use theprofile.ps1file from this repository and copy it to the path specified by$PROFILE. Assuming you have cloned the repository to your disk as in the image below:
- now you can copy the file using the command:
cp profile.ps1 $PROFILE
- restart
PowerShellto load the new configuration.
- Editor
In the
$PROFILEfile, a variable is set that configures the editor that will be used in the terminal. The default one ismicro. To set a different editor:
- open the file for editing:
micro $PROFILE - go to the line
$env:EDITOR = "micro" # "micro", "vim", "code", ...and type your editor (if installed)
- Functions Two functions are defined in the configuration file:
mcc: searches for files, displays the contents of text files and opens the selected file for readingcdd: searches for directories, displays the contents of the selected directory and goes to the selected directory
Your Windows system probably does not have the latest version of Powershell installed. Usually the version available on your system is much older (series 5) than the current one (series 7). If you want to use the latest version, you will need to install it. There are more than one way to install it and they are described in the documentation learn.microsoft.com.
Example installation using winget:
- Check available powershell versions: when using
wingetfor the first time a message will appear - confirm it (YES).winget search Microsoft.PowerShell
winget install --id Microsoft.PowerShell --source winget- open settings

- in settings click (in the left panel) PowerShell, next click
Command line - delete the existing entry and type
pwsh

- save settings, close the terminal and restart it
Different versions of PowerShell use different configuration files stored in different directories - as you can see in the image below.
- Open two separate windows:
- PowerShell version 5 -
Winkey, typepowershell - PowerShell version 7 -
Winkey, typeterminal
- Run the commands shown in the images below:
- check if the directory with $PROFILE exists, if not - create it
- copy the file
profile.ps1to $PROFILE - restore the terminal - it should be ready to work

- Installation of dependencies
In distributions based on the
Debiansystem, programs such asfzfandmicroshould be available in official repositories - this is the case, for example, forDebian 12. If necessary, use the information contained on the websites of these programs.
Example of installation:
sudo apt update
sudo apt install fzf micro bat- Configuration
- copy the
bash_func.shfile (downloaded from the repository) to the directory in which you store your own scripts (let's assume that this is the.scriptscatalog) - use the
chmodcommand to make the script executable
cp bash_func.sh ~/.scripts/fzf_func.sh
chmod +x ~/.scripts/fzf_func.sh- open the
.bashrcfile eg.:micro .bashrc - add at the end of the file: path to the directory with your scripts (eg.
~/.scripts) to$PATH - add at the end of the file:
source path_to_script.sh
export PATH="$HOME/.scripts:$PATH"
source $HOME/.scripts/fzf_linux_func.sh-
Configuring the
microeditor involves placing entries in thesettings.jsonfile. File location:-
Windows:
# PowerShell $env:APPDATA\micro\settings.json # CMD.exe %APPDATA%\micro\settings.json # example: C:\Users\<YourName>\AppData\Roaming\micro\settings.json
-
Linux:
~/.config/micro/settings.json -
macOs:
~/Library/Application Support/micro/settings.json
-
-
Minimal settings (Python-friendly):
{ "autoindent": true, "tabstospaces": true, "tabsize": 4, "detectindent": false, "rmtrailingws": true, "colorcolumn": 80 } -
settings_micro.json
The settings shown above are available in the repository in the
settings_micro.jsonfile. Copy the file to the appropriate location and rename it tosettings.json
- Link to Default Keys
- In the opened editor, enter:
<ctr> + e: open a command prompt for running commandsTab: In command prompt, it will autocomplete if possible.- In command prompt:
help defa + Tab --> help defaultkeys- will display help on defined keyboard shortcuts
- Basic shortcuts:
<ctr> + q: close current file (quits micro if this is the last file open)<ctr> + o: open a file (prompts for filename)<ctr> + s: save current file.
If the software installation and configuration have been made, the following tools for work in the terminal should be available:
mc: launches the user-defined editor - probablymicrofzf: interactive file search in the current working directorymcc: file search in the user's home directory with content preview (only text files) and opening to the edition of the selected filecdd: search for catalogs with a preview of their content and transition to the selected directory
In the entered patterns you can use:
$- means that the pattern ends the line, e.g. TXT $ will search for all files or catalogs ending withtxt|logicalore.g.txt $ | csv' '(space) logicalandeg:txt$ csv
To view rendered markdown files, you may find useful browser extensions:
- Google Chrome: Markdown Viewer
- Mozilla Firefox: Markdown Viewer
- Microsoft Edge: Markdown Preview
- Safari: QLMarkdown
Creating a new account in Windows 11 requires each time settings according to the user's preferences.
The settings.json file contains the settings for the terminal in Windows 11. Example settings:
- window size
- font size
- color scheme
Paste this file in a specific location on the disk allows you to easily transfer settings between accounts.
- Determining the location of the
settings.jsonfile:
- open powershell
- run the
cddfunction - type:
microsoft terminal state - go to the directory containing the
settings.jsonfile
- For safety, make a copy of the original file:
cp settings.json settings-copy.json


