# Todays questions:

- Florian VIM as Python IDE
- Maria when did a line of code change (yeah actual git question)
- Maria how to check out individual file (with a new name)
- Christian how to add users to a group in Linux
- Christian file directory structure in Linux
- Maria optparse in R debugging


# organisational
- invite attendees to common git group
- prepare git training where all do stuff on shared repo and resolve resulting problems
- prepare git workflows hands on
- we have new group https://git.idiv.de/stammtisch and a new project https://git.idiv.de/stammtisch/git-stammtisch.git

# answers
## Florian, VIM as Python IDE
- tmux and vim, have a look at https://git.idiv.de/scientific-computing/RStudio-Docu/blob/master/tmux.md
- search for tmux, vim and python PEP8
- use ! to execute commands from inside vim on the command line, e.g. the following will run wc on the current file

    ```
    :! wc %
    ```
- search for dotfiles
- [smaller adaptions](https://wiki.python.org/moin/Vim) of vim for python
- [bigger adaptions](https://realpython.com/blog/python/vim-and-python-a-match-made-in-heaven/) of vim for python
- [python mode](https://github.com/python-mode/python-mode)

## Maria, ask git when a line of code did change
- git will tell you in which commit a file changed

    ```
    git log dotfile.yml
    ```
- git will tell you when the line range in a file changed
    ```
    git log -L 10,12:dotfile.yml
    ```

- git will tell you when a function in a file changed

    ```
    git log -L :is_workday:analysis.r
    ```

## Maria how to check out individual file (with a new name)
- tell git to checkout file from commit (overwrites current version)
    ```
    git checkout 14134e6 muhkuh
    ```

- or checkout to a new file (mind the :)

    ```
    git checkout  14134e6:muhkuh > newkuh
    ```

## Christian how to add users to a group in Linux
- append a group to the groups a user is member of

    ```
    usermod -a -G groupName userName
    ```

## Christian file directory structure in Linux
Why do you need a `/`?

- Everything starts at / (say root).
- Your user usually has a home directory like /home/username
- There is a relative and absolute path
    - a absolute path starts with /
- https://wiki.ubuntuusers.de/Verzeichnisstruktur/

## Maria, optparse in R debugging
- time run out, feel free to add pointers/solution here

    ```R
    ?optparse
    vignette("optparse")
    ```