Skip to content

Commit

Permalink
Merge pull request #498 from machinavn/master
Browse files Browse the repository at this point in the history
Make Minimap's visible area display like Sublime Text, It's auto hide when not scrolling.
  • Loading branch information
abe33 committed Jun 6, 2016
2 parents 18d8e34 + 387ff24 commit 5c83144
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 0 deletions.
54 changes: 54 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,60 @@ atom-text-editor {
}
```

#### Make Minimap Visible area display like Sublime Text

Put the following code in your user stylesheet to make your minimap look like Sublime text.
It's more easy to view when you have code hightlight in minimap.

`Default State (Hidden)`|`Hover`|`Only display Visible area when hover or click/drag event.`
---|---|:---:
![](https://github.com/machinavn/minimap/blob/master/resources/on-default-minimap.png?raw=true)|![](https://github.com/machinavn/minimap/blob/master/resources/on-hover-minimap.png?raw=true)|![](https://github.com/machinavn/minimap/blob/master/resources/on-scroll-minimap.png?raw=true)

```css
atom-text-editor,
atom-text-editor::shadow,
html {
atom-text-editor-minimap {
&::shadow {
.minimap-visible-area {
background-color: #7c7c7c;
// Color of Visible area.
opacity: 0;
// Default 0 when you not working with minimap
cursor: default;
// Change cursor style to pointer.
transition: 0.5s opacity;
// Better UI.
&:hover {
opacity: 0.2;
} // Only display Minimap visible area when working.
&:active {
cursor: default;
} // Change cursor when dragging.
}

}
}
&:hover::shadow {
.minimap-visible-area {
opacity: 0.2;
transition: opacity 1s;
} // When Hover to all minimap area, visible area will display.
}

&:active::shadow {
.minimap-visible-area {
opacity: 0.2;
transition: opacity 0.5s;
} // Display Minimap visible area when dragging.
}
}
}

```



### ASCII Art Comments

One neat trick is to use ASCII art to create huge comments visible in the minimap. This is really efficient when navigating huge files.
Expand Down
Binary file added resources/on-default-minimap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/on-hover-minimap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/on-scroll-minimap.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5c83144

Please sign in to comment.