improve vim config + aliases behavior

* disable mouse option in vim (not working well with C/C on mac)
* improve function for getting article publication dates
This commit is contained in:
Morgan Wattiez
2019-08-04 22:44:51 +02:00
parent 23176b30c0
commit 9049a3c071
3 changed files with 9 additions and 3 deletions

View File

@ -78,5 +78,11 @@ function istherenewissues() {
echo "$LASTISSUE" > .newjiraissue
}
function greppagedate() {
curl -sSL "$*" | \grep datetime | \grep -Eo '[[:digit:]]{4}' | head -n1
year=$(curl -sSL "$*" | tr '<' '\r' | \egrep -i "date|datetime" -A 1 | \grep -Eo '\b[[:digit:]]{4}\b' | head -n1)
yearint=$(($year + 0))
currentyear=$(echo `date +"%Y"`)
if [[ $yearint -ge 1970 && $yearint -le $currentyear ]]
then
echo "$yearint"
fi
}